fix(core): update

This commit is contained in:
Philipp Kunz 2019-10-12 15:55:37 +02:00
parent 04a77f9eeb
commit 20bf5dfc57
4 changed files with 8 additions and 8 deletions

3
cli.js
View File

@ -1,3 +1,4 @@
#!/usr/bin/env node #!/usr/bin/env node
process.env.CLI_CALL = 'true'; process.env.CLI_CALL = 'true';
require('./dist/index'); const cliTool = require('./dist/index');
cliTool.runCli();

View File

@ -1,4 +1,5 @@
#!/usr/bin/env node #!/usr/bin/env node
process.env.CLI_CALL = 'true'; process.env.CLI_CALL = 'true';
require('@gitzone/tsrun'); require('@gitzone/tsrun');
require('./ts/index'); const cliTool = require('./ts/index');
cliTool.runCli();

View File

@ -2,8 +2,7 @@ import { expect, tap } from '@pushrocks/tapbundle';
import * as tsbundle from '../ts/index'; import * as tsbundle from '../ts/index';
tap.test('first test', async () => { tap.test('first test', async () => {
tsbundle; await tsbundle.runCli();
console.log('hi');
}); });
tap.start(); tap.start();

View File

@ -7,9 +7,8 @@ import { logger } from './tsbundle.logging';
import { runCli } from './tsbundle.cli'; import { runCli } from './tsbundle.cli';
early.stop(); early.stop();
if (process.env.CLI_CALL) {
runCli();
}
// lets make this usable programmatically // lets make this usable programmatically
export * from './tsbundle.class.tsbundle'; export * from './tsbundle.class.tsbundle';
export {
runCli
};