Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
0842c2fdec | |||
20bf5dfc57 | |||
04a77f9eeb | |||
a97af3232a | |||
01953fdfec | |||
2b794967d2 |
3
cli.js
3
cli.js
@ -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();
|
||||||
|
@ -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();
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbundle",
|
"name": "@gitzone/tsbundle",
|
||||||
"version": "1.0.43",
|
"version": "1.0.46",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/tsbundle",
|
"name": "@gitzone/tsbundle",
|
||||||
"version": "1.0.43",
|
"version": "1.0.46",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a bundler using rollup for painless bundling of web projects",
|
"description": "a bundler using rollup for painless bundling of web projects",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -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();
|
||||||
|
@ -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
|
||||||
|
};
|
||||||
|
@ -88,9 +88,7 @@ export class TsBundle {
|
|||||||
const productionOptions = this.getBaseOptions(fromArg, toArg);
|
const productionOptions = this.getBaseOptions(fromArg, toArg);
|
||||||
productionOptions.plugins.push(plugins.rollupTerser({
|
productionOptions.plugins.push(plugins.rollupTerser({
|
||||||
compress: true,
|
compress: true,
|
||||||
mangle: false,
|
mangle: true,
|
||||||
toplevel: false,
|
|
||||||
keep_classnames: true,
|
|
||||||
sourcemap: true
|
sourcemap: true
|
||||||
}));
|
}));
|
||||||
return productionOptions;
|
return productionOptions;
|
||||||
|
Reference in New Issue
Block a user