Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
6bbfd8b8a5 | |||
9e6ab262ed | |||
58246c406d | |||
345df135b9 | |||
31e99a0035 | |||
8aa3823e65 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbuild",
|
"name": "@gitzone/tsbuild",
|
||||||
"version": "2.1.17",
|
"version": "2.1.20",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbuild",
|
"name": "@gitzone/tsbuild",
|
||||||
"version": "2.1.17",
|
"version": "2.1.20",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "TypeScript nightly to easily make use of latest features",
|
"description": "TypeScript nightly to easily make use of latest features",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
4
test/assets/output/tocompile.d.ts
vendored
4
test/assets/output/tocompile.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
declare class test2 {
|
declare class test2 {
|
||||||
test: string[];
|
test: string[];
|
||||||
constructor();
|
constructor();
|
||||||
}
|
}
|
||||||
declare const run: () => Promise<string>;
|
declare const run: () => Promise<string>;
|
||||||
|
@ -6,7 +6,7 @@ const tsbuildCli = new plugins.smartcli.Smartcli();
|
|||||||
/**
|
/**
|
||||||
* the standard task compiles anything in ts/ directory to dist directory
|
* the standard task compiles anything in ts/ directory to dist directory
|
||||||
*/
|
*/
|
||||||
tsbuildCli.standardTask().subscribe(argvArg => {
|
tsbuildCli.standardTask().subscribe(async argvArg => {
|
||||||
if (process.env.CLI_CALL_TSBUILD === 'true') {
|
if (process.env.CLI_CALL_TSBUILD === 'true') {
|
||||||
tsbuild.compileGlobStringObject(
|
tsbuild.compileGlobStringObject(
|
||||||
{
|
{
|
||||||
@ -22,14 +22,20 @@ tsbuildCli.standardTask().subscribe(argvArg => {
|
|||||||
/**
|
/**
|
||||||
* the custom command compiles any customDir to dist_customDir
|
* the custom command compiles any customDir to dist_customDir
|
||||||
*/
|
*/
|
||||||
tsbuildCli.addCommand('custom').subscribe(argvArg => {
|
tsbuildCli.addCommand('custom').subscribe(async argvArg => {
|
||||||
const listedDirectories = argvArg._;
|
const listedDirectories = argvArg._;
|
||||||
listedDirectories.shift();
|
listedDirectories.shift();
|
||||||
const compilationCommandObject: { [key: string]: string } = {};
|
const compilationCommandObject: { [key: string]: string } = {};
|
||||||
for (const directory of listedDirectories) {
|
for (const directory of listedDirectories) {
|
||||||
compilationCommandObject[`./${directory}/**/*.ts`] = `./dist_${directory}`;
|
compilationCommandObject[`./${directory}/**/*.ts`] = `./dist_${directory}`;
|
||||||
}
|
}
|
||||||
tsbuild.compileGlobStringObject(compilationCommandObject, {}, process.cwd(), argvArg);
|
await tsbuild.compileGlobStringObject(compilationCommandObject, {}, process.cwd(), argvArg);
|
||||||
|
});
|
||||||
|
|
||||||
|
tsbuildCli.addCommand('element').subscribe(async argvArg => {
|
||||||
|
await tsbuild.compileGlobStringObject({
|
||||||
|
"./ts_web/**/*.ts": "dist_ts_web"
|
||||||
|
}, {}, process.cwd(), {web: true});
|
||||||
});
|
});
|
||||||
|
|
||||||
tsbuildCli.startParse();
|
tsbuildCli.startParse();
|
||||||
|
Reference in New Issue
Block a user