refactor: change source to build, and add new buildSource var. Add tsconfig.build overrides
This commit is contained in:
parent
edf1960010
commit
ab3c7bada2
|
@ -1,4 +1,4 @@
|
||||||
input: '{source}/index.ts'
|
input: '{source}/index.js'
|
||||||
output:
|
output:
|
||||||
- file: '{output}/index.js'
|
- file: '{output}/index.js'
|
||||||
format: cjs
|
format: cjs
|
||||||
|
|
|
@ -41,11 +41,13 @@ export type Variable = {
|
||||||
source: string;
|
source: string;
|
||||||
/** the directory containing all the compiled files (default: lib) */
|
/** the directory containing all the compiled files (default: lib) */
|
||||||
output: string;
|
output: string;
|
||||||
|
buildSource: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DEFAULT_VARIABLE: Variable = {
|
export const DEFAULT_VARIABLE: Variable = {
|
||||||
source: 'source',
|
source: 'build',
|
||||||
output: 'lib',
|
output: 'lib',
|
||||||
|
buildSource: 'buildSource',
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,8 +73,12 @@ export default function (): PresetAsset {
|
||||||
scripts: resolve(TEMPLATES, 'scripts.yaml'),
|
scripts: resolve(TEMPLATES, 'scripts.yaml'),
|
||||||
noSymlinks: ['rollup.config.ts'],
|
noSymlinks: ['rollup.config.ts'],
|
||||||
supplementaryConfig: {
|
supplementaryConfig: {
|
||||||
gitignore: ['/rollup.config.ts'],
|
'gitignore': ['/rollup.config.ts'],
|
||||||
rollup: resolve(CONFIGS, 'rollup.yaml'),
|
'rollup': resolve(CONFIGS, 'rollup.yaml'),
|
||||||
|
'tsconfig.build': {
|
||||||
|
include: ['{buildSource}'],
|
||||||
|
outDir: ['{source}'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
variable: DEFAULT_VARIABLE,
|
variable: DEFAULT_VARIABLE,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue