feat: implement basic public api

This commit is contained in:
Igor Randjelovic
2020-11-18 14:10:44 +01:00
parent 478a83d363
commit c1d240d66f
18 changed files with 201 additions and 138 deletions

View File

@ -7,36 +7,12 @@ import svelte from './svelte';
import typescript from './typescript';
import vue from './vue';
// export chain configs
// todo: rename if needed
export { base as __base, angular as __angular, javascript as __javascript, react as __react, svelte as __svelte, typescript as __typescript, vue as __vue };
// export final configs
export const baseConfig = (env: IWebpackEnv) => base(env).toConfig();
export const angularConfig = (env: IWebpackEnv) => angular(env).toConfig();
export const javascriptConfig = (env: IWebpackEnv) => javascript(env).toConfig();
export const reactConfig = (env: IWebpackEnv) => react(env).toConfig();
export const svelteConfig = (env: IWebpackEnv) => svelte(env).toConfig();
export const typescriptConfig = (env: IWebpackEnv) => typescript(env).toConfig();
export const vueConfig = (env: IWebpackEnv) => vue(env).toConfig();
export interface IWebpackEnv {
[name: string]: any;
appPath?: string;
appResourcesPath?: string;
android?: boolean;
ios?: boolean;
production?: boolean;
report?: boolean;
hmr?: boolean;
// todo: add others
}
export enum WebpackPlatform {
'ios',
'android',
}
export const configs = {
base,
angular,
javascript,
react,
svelte,
typescript,
vue,
};