Compare commits

...

22 Commits

Author SHA1 Message Date
f33f985d3d 1.0.49 2020-03-02 09:42:45 +00:00
ddae40ddb2 fix(core): update 2020-03-02 09:42:44 +00:00
4256578bc6 1.0.48 2020-03-02 09:37:04 +00:00
1dd604d572 fix(core): update 2020-03-02 09:37:04 +00:00
262fd6e718 1.0.47 2019-10-12 15:56:44 +02:00
d660550485 fix(core): update 2019-10-12 15:56:44 +02:00
0842c2fdec 1.0.46 2019-10-12 15:55:37 +02:00
20bf5dfc57 fix(core): update 2019-10-12 15:55:37 +02:00
04a77f9eeb 1.0.45 2019-10-06 23:34:05 +02:00
a97af3232a fix(core): update 2019-10-06 23:34:04 +02:00
01953fdfec 1.0.44 2019-10-06 01:21:33 +02:00
2b794967d2 fix(core): update 2019-10-06 01:21:32 +02:00
eacda66c43 1.0.43 2019-10-05 22:59:53 +02:00
5f048712e1 fix(core): update 2019-10-05 22:59:52 +02:00
6d6c851274 1.0.42 2019-10-05 21:26:24 +02:00
afc3141fb2 fix(core): update 2019-10-05 21:26:24 +02:00
317487ffaa 1.0.41 2019-10-05 21:25:45 +02:00
ac8d603060 fix(core): update 2019-10-05 21:25:44 +02:00
c46621517b 1.0.40 2019-08-26 16:33:09 +02:00
4b283ad6a3 fix(core): update 2019-08-26 16:33:08 +02:00
6f3aab9232 1.0.39 2019-08-26 16:32:26 +02:00
de60087146 fix(core): update 2019-08-26 16:32:26 +02:00
7 changed files with 669 additions and 655 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();

1250
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@gitzone/tsbundle", "name": "@gitzone/tsbundle",
"version": "1.0.38", "version": "1.0.49",
"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",
@ -16,35 +16,36 @@
"tsbundle": "cli.js" "tsbundle": "cli.js"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.11", "@gitzone/tsbuild": "^2.1.17",
"@gitzone/tsrun": "^1.2.6", "@gitzone/tsrun": "^1.2.8",
"@gitzone/tstest": "^1.0.15", "@gitzone/tstest": "^1.0.28",
"@pushrocks/tapbundle": "^3.0.13", "@pushrocks/tapbundle": "^3.2.0",
"@types/node": "^12.6.6", "@types/node": "^13.7.7",
"tslint": "^5.19.0", "tslint": "^6.0.0",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.15.0"
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.4.4", "@babel/core": "^7.6.2",
"@babel/plugin-proposal-class-properties": "^7.4.4", "@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-decorators": "^7.4.4", "@babel/plugin-proposal-decorators": "^7.6.0",
"@babel/plugin-transform-runtime": "^7.4.4", "@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.4.4", "@babel/preset-env": "^7.6.2",
"@babel/runtime": "^7.4.4", "@babel/runtime": "^7.6.2",
"@pushrocks/early": "^3.0.3", "@pushrocks/early": "^3.0.3",
"@pushrocks/smartcli": "^3.0.7", "@pushrocks/smartcli": "^3.0.7",
"@pushrocks/smartfile": "^7.0.2", "@pushrocks/smartfile": "^7.0.8",
"@pushrocks/smartlog": "^2.0.19", "@pushrocks/smartlog": "^2.0.21",
"@pushrocks/smartlog-destination-local": "^8.0.2", "@pushrocks/smartlog-destination-local": "^8.0.2",
"@types/html-minifier": "^3.5.3", "@types/html-minifier": "^3.5.3",
"html-minifier": "^4.0.0", "html-minifier": "^4.0.0",
"rollup": "^1.10.1", "rollup": "^1.32.0",
"rollup-plugin-babel": "^4.3.2", "rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^10.0.1", "rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-sourcemaps": "^0.5.0",
"rollup-plugin-terser": "^5.0.0", "rollup-plugin-terser": "^5.2.0",
"rollup-plugin-typescript2": "^0.22.0" "rollup-plugin-typescript2": "^0.26.0",
"terser": "^4.6.4"
}, },
"files": [ "files": [
"ts/*", "ts/*",

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,9 @@ 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 * from './tsbundle.htmlhandler';
export {
runCli
};

View File

@ -33,7 +33,7 @@ export class TsBundle {
experimentalDecorators: true, experimentalDecorators: true,
inlineSourceMap: true, inlineSourceMap: true,
noEmitOnError: true, noEmitOnError: true,
lib: ['es2017', 'dom'], lib: ['esnext', 'dom'],
target: 'es2017', target: 'es2017',
noImplicitAny: false noImplicitAny: false
} }
@ -86,7 +86,11 @@ export class TsBundle {
public getOptionsProduction(fromArg: string, toArg: string): plugins.rollup.RollupOptions { public getOptionsProduction(fromArg: string, toArg: string): plugins.rollup.RollupOptions {
const productionOptions = this.getBaseOptions(fromArg, toArg); const productionOptions = this.getBaseOptions(fromArg, toArg);
productionOptions.plugins.push(plugins.rollupTerser()); productionOptions.plugins.push(plugins.rollupTerser({
compress: true,
mangle: true,
sourcemap: true
}));
return productionOptions; return productionOptions;
} }
@ -102,8 +106,8 @@ export class TsBundle {
logger.log('info', `bundling for TEST!`); logger.log('info', `bundling for TEST!`);
const buildOptions = this.getOptionsTest(fromArg, toArg); const buildOptions = this.getOptionsTest(fromArg, toArg);
const bundle = await plugins.rollup.rollup(buildOptions); const bundle = await plugins.rollup.rollup(buildOptions);
bundle.generate(buildOptions.output); bundle.generate(buildOptions.output as plugins.rollup.OutputOptions);
await bundle.write(buildOptions.output); await bundle.write(buildOptions.output as plugins.rollup.OutputOptions);
logger.log('ok', `Successfully bundled files!`); logger.log('ok', `Successfully bundled files!`);
} }
@ -115,8 +119,8 @@ export class TsBundle {
logger.log('info', `bundling for PRODUCTION!`); logger.log('info', `bundling for PRODUCTION!`);
const buildOptions = this.getOptionsProduction(fromArg, toArg); const buildOptions = this.getOptionsProduction(fromArg, toArg);
const bundle = await plugins.rollup.rollup(buildOptions); const bundle = await plugins.rollup.rollup(buildOptions);
bundle.generate(buildOptions.output); bundle.generate(buildOptions.output as plugins.rollup.OutputOptions);
await bundle.write(buildOptions.output); await bundle.write(buildOptions.output as plugins.rollup.OutputOptions);
logger.log('ok', `Successfully bundled files!`); logger.log('ok', `Successfully bundled files!`);
} }
} }