diff --git a/VERSION b/VERSION index 95dfee2..9c2a097 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.23 \ No newline at end of file +0.0.24 \ No newline at end of file diff --git a/dist/js/config/terser.config.d.ts b/dist/js/config/terser.config.d.ts index 699c098..da1e75b 100644 --- a/dist/js/config/terser.config.d.ts +++ b/dist/js/config/terser.config.d.ts @@ -7,12 +7,7 @@ declare const terserConfig: { arrows: boolean; }; mangle: { - properties: { - bare_returns: boolean; - html5_comments: boolean; - shebang: boolean; - spidermonkey: boolean; - }; + properties: boolean; }; format: { comments: boolean; diff --git a/dist/js/config/terser.config.js b/dist/js/config/terser.config.js index 4411b1a..378dc87 100644 --- a/dist/js/config/terser.config.js +++ b/dist/js/config/terser.config.js @@ -37,14 +37,7 @@ const terserConfig = { mangle: { // mangle options // Mangle names for obfuscation and size reduction - // properties: true, // Mangle property names - properties: { - // mangle property options - bare_returns: false, //support top level return statements - html5_comments: true, // (default true) - shebang: true, //(default true) -- support #!command as the first line - spidermonkey: false - } + properties: true }, format: { // format options (can also use `output` for backwards compatibility) diff --git a/dist/package.json b/dist/package.json index 718a7ac..fdcaa4d 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,6 +1,6 @@ { "name": "pack.gl", - "version": "0.0.23", + "version": "0.0.24", "description": "Package Builder.", "keywords": [ "pack.gl", diff --git a/dist/ts/config/terser.config.ts b/dist/ts/config/terser.config.ts index a9aacd0..c480d10 100644 --- a/dist/ts/config/terser.config.ts +++ b/dist/ts/config/terser.config.ts @@ -163,14 +163,14 @@ const terserConfig = { mangle: { // mangle options // Mangle names for obfuscation and size reduction - // properties: true, // Mangle property names - properties: { - // mangle property options - bare_returns: false, //support top level return statements - html5_comments: true, // (default true) - shebang: true, //(default true) -- support #!command as the first line - spidermonkey: false, // (default false) -- accept a Spidermonkey (Mozilla) AST - } + properties: true, // Mangle property names + // properties: { + // // mangle property options + // // bare_returns: false, //support top level return statements + // html5_comments: true, // (default true) + // shebang: true, //(default true) -- support #!command as the first line + // spidermonkey: false, // (default false) -- accept a Spidermonkey (Mozilla) AST + // } }, format: { // format options (can also use `output` for backwards compatibility) diff --git a/package-lock.json b/package-lock.json index d3385f1..1683ecd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pack.gl", - "version": "0.0.23", + "version": "0.0.24", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pack.gl", - "version": "0.0.23", + "version": "0.0.24", "funding": [ { "type": "github", @@ -62,7 +62,7 @@ "icon.gl": "^0.0.1", "loop.gl": "^0.0.1", "mini-css-extract-plugin": "^2.7.6", - "pack.gl": "^0.0.22", + "pack.gl": "^0.0.23", "page.gl": "^0.0.1", "postcss-loader": "^7.3.3", "postcss-preset-env": "^9.1.2", @@ -11239,9 +11239,9 @@ } }, "node_modules/pack.gl": { - "version": "0.0.22", - "resolved": "https://registry.npmjs.org/pack.gl/-/pack.gl-0.0.22.tgz", - "integrity": "sha512-1T7m54/IxMyywIIWcy9czE3clWclwZV0CnMB6AKKoSKFbiIWh9qKN8B7BRiad4gJmoMy2kvtRZurdpPDmnb0MA==", + "version": "0.0.23", + "resolved": "https://registry.npmjs.org/pack.gl/-/pack.gl-0.0.23.tgz", + "integrity": "sha512-M5J0f4LWyakYrIds1kWHyaxipGKCu1reUx8zw1o7ykdq0hY7hLpjtSetKyz6HfqMwLdFr3XYF3otrUvL9qAjYw==", "dev": true, "dependencies": { "@types/fs-extra": "^11.0.4", diff --git a/package.json b/package.json index 55fc055..9ca39bd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pack.gl", "description": "Package Builder.", - "version": "0.0.23", + "version": "0.0.24", "config": { "version_short": "0.0" }, @@ -95,7 +95,7 @@ "icon.gl": "^0.0.1", "loop.gl": "^0.0.1", "mini-css-extract-plugin": "^2.7.6", - "pack.gl": "^0.0.22", + "pack.gl": "^0.0.23", "page.gl": "^0.0.1", "postcss-loader": "^7.3.3", "postcss-preset-env": "^9.1.2", diff --git a/script/js/index.js.map b/script/js/index.js.map index 01c5123..60526a1 100644 --- a/script/js/index.js.map +++ b/script/js/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";AAsBA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,aAAa,EACb,kBAAkB,EAElB,cAAc,EACd,YAAY,EACZ,eAAe,GAClB,MAAM,SAAS,CAAC;AAOjB,IAAM,MAAM,GAAG;IACX,IAAI,EAAE;QACF,GAAG,EAAiB,OAAO;QAC3B,IAAI,EAAgB,QAAQ;QAC5B,WAAW,EAAS,QAAQ;QAC5B,QAAQ,EAAY,UAAU;QAC9B,SAAS,EAAW,WAAW;QAC/B,SAAS,EAAW,WAAW;KAElC;CAEJ,CAAC;AAYF,SAAe,IAAI;;;;;;;oBASL,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;oBAMpC,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;oBACvC,WAAM,YAAY,EAAE,EAAA;;oBAApB,SAAoB,CAAC;oBAMf,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;oBAChD,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;oBACnC,gBAAgB,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBAClD,MAAM,CAAC,IAAI,CAAC,6BAAsB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC,CAAC;oBAM3B,WAAM,eAAe,CAAC,gBAAgB,CAAC,EAAA;;oBAA5D,kBAAkB,GAAG,SAAuC;oBAC5D,cAAc,GAAG,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC;oBACxD,aAAa,GAAG,cAAc,CAAC,MAAM,CAAA;oBAC3C,cAAc,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAA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C,CAAC;oBACI,SAAS,GAAG,WAAW,CAAC;oBAE9B,WAAM,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,CAAC,EAAA;;oBAA5C,SAA4C,CAAC;;;;oBA2B7C,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,OAAK,CAAC,CAAC;;;;;;CAGlD;AAQD,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/script/ts/index.ts b/script/ts/index.ts index bbe6ff8..c30666c 100644 --- a/script/ts/index.ts +++ b/script/ts/index.ts @@ -27,7 +27,7 @@ import { PackageCreator, VersionWriter, TypeScriptCompiler, - // JavaScriptMinifier, + JavaScriptMinifier, StylizedLogger, gl_installer, readPackageJson, @@ -128,6 +128,27 @@ async function main() { await tsCompiler.compile(tsFiles, outputDir); // console.log('TypeScript compilation completed.'); + // Rename Ts + // -------------------------------------------------------------------- + + // await fileRenamer.renameFile( + // path.join(CONFIG.path.js_output, 'index.js'), + // path.join(CONFIG.path.js_output, `${packageConfig.name}.js`), + // ) + + + // Minify JavaScript + // -------------------------------------------------------------------- + // const jsMinifier = new JavaScriptMinifier(); + // await jsMinifier.minifyFile( + // path.join(CONFIG.path.js_output, 'index.js'), + // path.join(CONFIG.path.js_output, `${packageConfig.name}.min.js`), + // ) + // .then(() => console.log('JavaScript minification completed.')) + // .catch(console.error); + + + } catch (error) { diff --git a/src/ts/config/terser.config.ts b/src/ts/config/terser.config.ts index a9aacd0..c480d10 100644 --- a/src/ts/config/terser.config.ts +++ b/src/ts/config/terser.config.ts @@ -163,14 +163,14 @@ const terserConfig = { mangle: { // mangle options // Mangle names for obfuscation and size reduction - // properties: true, // Mangle property names - properties: { - // mangle property options - bare_returns: false, //support top level return statements - html5_comments: true, // (default true) - shebang: true, //(default true) -- support #!command as the first line - spidermonkey: false, // (default false) -- accept a Spidermonkey (Mozilla) AST - } + properties: true, // Mangle property names + // properties: { + // // mangle property options + // // bare_returns: false, //support top level return statements + // html5_comments: true, // (default true) + // shebang: true, //(default true) -- support #!command as the first line + // spidermonkey: false, // (default false) -- accept a Spidermonkey (Mozilla) AST + // } }, format: { // format options (can also use `output` for backwards compatibility)