Compare commits

...

10 Commits

Author SHA1 Message Date
a935dc0b86 1.0.68 2020-05-25 17:23:52 +00:00
9a43d77fe6 fix(core): update 2020-05-25 17:23:51 +00:00
e9ca5147f3 1.0.67 2020-05-25 17:01:43 +00:00
b418ccd10a fix(core): update 2020-05-25 17:01:43 +00:00
eeeac6cb7f 1.0.66 2020-05-25 16:43:58 +00:00
c0d05bab7f fix(core): update 2020-05-25 16:43:58 +00:00
0cceb23987 1.0.65 2020-05-25 16:40:34 +00:00
1b91c7a46c fix(core): update 2020-05-25 16:40:33 +00:00
bd9ec3b313 1.0.64 2020-05-25 16:29:23 +00:00
ada2ae72ee fix(core): update 2020-05-25 16:29:22 +00:00
4 changed files with 556 additions and 308 deletions

806
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.63", "version": "1.0.68",
"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_ts/index.js", "main": "dist_ts/index.js",
@ -16,36 +16,37 @@
"tsbundle": "cli.js" "tsbundle": "cli.js"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.22", "@gitzone/tsbuild": "^2.1.24",
"@gitzone/tsrun": "^1.2.8", "@gitzone/tsrun": "^1.2.8",
"@gitzone/tstest": "^1.0.28", "@gitzone/tstest": "^1.0.28",
"@pushrocks/tapbundle": "^3.2.1", "@pushrocks/tapbundle": "^3.2.1",
"tslint": "^6.1.0", "tslint": "^6.1.2",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.15.0"
}, },
"dependencies": { "dependencies": {
"@babel/core": "^7.8.7", "@babel/core": "^7.9.6",
"@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.8.3", "@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.8.3", "@babel/plugin-transform-runtime": "^7.9.6",
"@babel/preset-env": "^7.8.7", "@babel/preset-env": "^7.9.6",
"@babel/runtime": "^7.8.7", "@babel/runtime": "^7.9.6",
"@pushrocks/early": "^3.0.3", "@pushrocks/early": "^3.0.3",
"@pushrocks/smartcli": "^3.0.9", "@pushrocks/smartcli": "^3.0.11",
"@pushrocks/smartfile": "^7.0.11", "@pushrocks/smartfile": "^7.0.12",
"@pushrocks/smartlog": "^2.0.21", "@pushrocks/smartlog": "^2.0.21",
"@pushrocks/smartlog-destination-local": "^8.0.2", "@pushrocks/smartlog-destination-local": "^8.0.2",
"@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-commonjs": "^12.0.0",
"@rollup/plugin-node-resolve": "^7.1.1", "@rollup/plugin-node-resolve": "^8.0.0",
"@rollup/plugin-typescript": "^4.0.0", "@rollup/plugin-typescript": "^4.1.2",
"@types/html-minifier": "^3.5.3", "@types/html-minifier": "^3.5.3",
"@types/node": "^13.9.1", "@types/node": "^14.0.5",
"html-minifier": "^4.0.0", "html-minifier": "^4.0.0",
"rollup": "^2.1.0", "rollup": "^2.10.9",
"rollup-plugin-babel": "^4.4.0", "rollup-plugin-babel": "^4.4.0",
"rollup-plugin-sourcemaps": "^0.5.0", "rollup-plugin-sourcemaps": "^0.6.2",
"rollup-plugin-terser": "^5.3.0", "rollup-plugin-terser": "^5.3.0",
"terser": "^4.6.7" "terser": "^4.7.0",
"typescript": "^3.9.3"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

View File

@ -36,17 +36,14 @@ export class TsBundle {
noEmitOnError: true, noEmitOnError: true,
lib: ['esnext', 'dom', 'es2017.object'], lib: ['esnext', 'dom', 'es2017.object'],
noImplicitAny: false, noImplicitAny: false,
target: 'es2018' target: 'es2018',
allowSyntheticDefaultImports: true
}), }),
// Allow node_modules resolution, so you can use 'external' to control // Allow node_modules resolution, so you can use 'external' to control
// which external modules to include in the bundle // which external modules to include in the bundle
// https://github.com/rollup/rollup-plugin-node-resolve#usage // https://github.com/rollup/rollup-plugin-node-resolve#usage
plugins.rollupResolve(), plugins.rollupResolve(),
plugins.rollupCommonjs({ plugins.rollupCommonjs({}),
namedExports: {
'node_modules/@pushrocks/smartstate/dist/index.js': ['Smartstate']
}
}),
// Resolve source maps to the original source // Resolve source maps to the original source
plugins.rollupSourceMaps() plugins.rollupSourceMaps()

View File

@ -37,6 +37,22 @@ export const runCli = async () => {
} }
}); });
tsBundleCli.addCommand('npm').subscribe(async argvArg => {
const tsbundle = new TsBundle();
// const htmlHandler = new HtmlHandler();
switch (true) {
case argvArg.production || process.env.CI:
await tsbundle.buildProduction('./ts/index.ts', './dist_bundle/bundle.js');
// await htmlHandler.minifyHtml();
break;
case argvArg.test:
default:
await tsbundle.buildTest('./ts/index.ts', './dist_bundle/bundle.js');
// await htmlHandler.copyHtml();
return;
}
});
tsBundleCli.addCommand('website').subscribe(async argvArg => { tsBundleCli.addCommand('website').subscribe(async argvArg => {
const tsbundle = new TsBundle(); const tsbundle = new TsBundle();
const htmlHandler = new HtmlHandler(); const htmlHandler = new HtmlHandler();