refactor: change source to build, and add new buildSource var. Add tsconfig.build overrides

This commit is contained in:
Derrick Hammer 2023-06-30 03:45:26 -04:00
parent edf1960010
commit ab3c7bada2
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 28 additions and 22 deletions

View File

@ -1,4 +1,4 @@
input: '{source}/index.ts'
input: '{source}/index.js'
output:
- file: '{output}/index.js'
format: cjs

View File

@ -41,11 +41,13 @@ export type Variable = {
source: string;
/** the directory containing all the compiled files (default: lib) */
output: string;
buildSource: string;
};
export const DEFAULT_VARIABLE: Variable = {
source: 'source',
source: 'build',
output: 'lib',
buildSource: 'buildSource',
};
/**
@ -71,8 +73,12 @@ export default function (): PresetAsset {
scripts: resolve(TEMPLATES, 'scripts.yaml'),
noSymlinks: ['rollup.config.ts'],
supplementaryConfig: {
gitignore: ['/rollup.config.ts'],
rollup: resolve(CONFIGS, 'rollup.yaml'),
'gitignore': ['/rollup.config.ts'],
'rollup': resolve(CONFIGS, 'rollup.yaml'),
'tsconfig.build': {
include: ['{buildSource}'],
outDir: ['{source}'],
},
},
variable: DEFAULT_VARIABLE,
};