@adonisjs/sink
Version:
AdonisJS sink is a swiss knife for managing project files by applying minimal changes, inferring formatting from EditorConfig file and comes with specialized tasks for different file formats and file types.
51 lines (50 loc) • 1.14 kB
TypeScript
import { PackageJson } from 'mrm-core';
import { AppEnvironments } from '@ioc:Adonis/Core/Application';
/**
* Shape of the template node
*/
export type TemplateNode = {
src: string;
dest: string;
data?: any;
mustache?: boolean;
} | string;
/**
* Shape of the package instructions node
*/
export type PackageInstructionsBlock = {
instructions?: string;
instructionsMd?: string;
templates?: {
basePath?: string;
} & {
[templateFor: string]: TemplateNode | TemplateNode[];
};
env?: {
[key: string]: string;
};
preloads?: (string | {
file: string;
environment?: AppEnvironments[];
optional?: boolean;
})[];
metaFiles?: (string | {
pattern: string;
reloadServer?: boolean;
})[];
types?: string;
commands?: string[];
providers?: string[];
aliases?: {
[key: string]: string;
};
aceProviders?: string[];
testProviders?: string[];
};
/**
* Shape of the package file along with the adonisjs
* block
*/
export type PackageFile = PackageJson & {
adonisjs: PackageInstructionsBlock;
};