@omni-door/tpl-component-library-react
Version:
The React component-library-react project template
40 lines (39 loc) • 1.55 kB
TypeScript
import { PKJTOOL, STYLE, STRATEGY, DEVSERVER, MARKDOWN } from '@omni-door/tpl-utils';
import { TPLS_INITIAL, TPLS_INITIAL_RETURE, TPLS_NEW, TPLS_NEW_RETURE } from './templates';
export declare type ResultOfDependencies = string[] | {
add?: string[];
remove?: string[];
};
export declare type InitOptions = {
strategy: STRATEGY;
projectName: string;
initPath: string;
configFileName?: string;
devServer: DEVSERVER;
ts: boolean;
test: boolean;
eslint: boolean;
commitlint: boolean;
style: STYLE;
stylelint: boolean;
pkgtool?: PKJTOOL;
isSlient?: boolean;
tpls?: (tpls: TPLS_INITIAL) => TPLS_INITIAL_RETURE;
dependencies?: (dependecies_default: string[]) => ResultOfDependencies;
devDependencies?: (devDependecies_default: string[]) => ResultOfDependencies;
error?: (err: any) => any;
success?: (results: any[]) => any;
};
declare function init({ strategy, projectName: name, initPath, configFileName, devServer, ts, test, eslint, commitlint, style, stylelint, tpls, pkgtool, isSlient, dependencies: dependencies_custom, devDependencies: devDependencies_custom, error, success }: InitOptions): Promise<void>;
export declare function newTpl({ ts, test, componentName, stylesheet, newPath, md, type, hasStorybook, tpls }: {
ts: boolean;
test: boolean;
componentName: string;
stylesheet: STYLE;
newPath: string;
md: MARKDOWN;
type: 'fc' | 'cc';
hasStorybook: boolean;
tpls?: (tpls: TPLS_NEW) => TPLS_NEW_RETURE;
}): void;
export default init;