fix(core): update
This commit is contained in:
parent
f36dea3875
commit
d5852ce85d
@ -10,6 +10,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "tsrun test/test.ts",
|
"test": "tsrun test/test.ts",
|
||||||
|
"testCustom": "node cli.ts.js custom ts_web",
|
||||||
"build": "node cli.ts.js"
|
"build": "node cli.ts.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -3,6 +3,9 @@ import * as tsbuild from './tsbuild.exports';
|
|||||||
|
|
||||||
const tsbuildCli = new plugins.smartcli.Smartcli();
|
const tsbuildCli = new plugins.smartcli.Smartcli();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the standard task compiles anything in ts/ directory to dist directory
|
||||||
|
*/
|
||||||
tsbuildCli.standardTask().subscribe(argvArg => {
|
tsbuildCli.standardTask().subscribe(argvArg => {
|
||||||
if (process.env.CLI_CALL_TSBUILD === 'true') {
|
if (process.env.CLI_CALL_TSBUILD === 'true') {
|
||||||
tsbuild.compileGlobStringObject(
|
tsbuild.compileGlobStringObject(
|
||||||
@ -16,4 +19,22 @@ tsbuildCli.standardTask().subscribe(argvArg => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the custom command compiles any customDir to dist_customDir
|
||||||
|
*/
|
||||||
|
tsbuildCli.addCommand('custom').subscribe(argvArg => {
|
||||||
|
const listedDirectories = argvArg._;
|
||||||
|
listedDirectories.shift();
|
||||||
|
const compilationCommandObject: {[key: string]: string} = {};
|
||||||
|
for (const directory of listedDirectories) {
|
||||||
|
compilationCommandObject['./' + directory] = './dist_' + directory;
|
||||||
|
};
|
||||||
|
tsbuild.compileGlobStringObject(
|
||||||
|
compilationCommandObject,
|
||||||
|
{},
|
||||||
|
process.cwd(),
|
||||||
|
argvArg
|
||||||
|
);
|
||||||
|
})
|
||||||
|
|
||||||
tsbuildCli.startParse();
|
tsbuildCli.startParse();
|
||||||
|
Loading…
Reference in New Issue
Block a user