diff --git a/compiler/package-lock.json b/compiler/package-lock.json index 09d2d40..d0bd049 100644 --- a/compiler/package-lock.json +++ b/compiler/package-lock.json @@ -4047,6 +4047,12 @@ "resolved": "https://registry.npmmirror.com/typescript/download/typescript-4.5.4.tgz", "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==" }, + "uglify-js": { + "version": "3.14.5", + "resolved": "https://registry.npmmirror.com/uglify-js/download/uglify-js-3.14.5.tgz", + "integrity": "sha512-qZukoSxOG0urUTvjc2ERMTcAy+BiFh3weWAkeurLwjrCba73poHmG3E36XEjd/JGukMzwTL7uCxZiAexj8ppvQ==", + "dev": true + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.nlark.com/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-2.0.0.tgz", diff --git a/compiler/package.json b/compiler/package.json index ee9a8e1..b3b92f1 100644 --- a/compiler/package.json +++ b/compiler/package.json @@ -10,7 +10,7 @@ ], "scripts": { "lint": "eslint --fix ./src --ext .ts", - "build": "npm run generateSyntaxParser && npm run generateDeclarations && ./node_modules/.bin/babel ./src --out-dir lib --extensions .ts", + "build": "npm run generateSyntaxParser && npm run generateDeclarations && ./node_modules/.bin/babel ./src --out-dir lib --extensions .ts && node uglify-source.js lib", "create": "node ./lib/create.js --env projectName", "compile": "webpack --config webpack.config.js --env buildMode=debug projectName", "test": "npm run build && mocha -r mocha-context/register test/test.js", @@ -31,7 +31,7 @@ "mocha": "^8.2.1", "mocha-context": "^0.1.5", "ts-node": "^9.1.1", - "uglify-es": "^3.3.10", + "uglify-js": "^3.13.0", "pegjs": "^0.10.0" }, "dependencies": { diff --git a/compiler/uglify-source.js b/compiler/uglify-source.js index 0823ead..397d5eb 100644 --- a/compiler/uglify-source.js +++ b/compiler/uglify-source.js @@ -15,7 +15,7 @@ const fs = require('fs') const path = require('path') -const uglifyJS = require('uglify-es') +const uglifyJS = require('uglify-js') readCode(process.argv[2])