aboutsummaryrefslogtreecommitdiff
path: root/package.json
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2017-09-28 17:14:56 +0300
committerValentin Popov <info@valentineus.link>2017-09-28 17:14:56 +0300
commit95f269594837ec1a137d5876e4517a844806a5bf (patch)
tree5b22374e337e1fde4ff4c13f3195cd6236f75ae8 /package.json
parent5e4bfac39a53498f457d02ff5aac3653a6c822df (diff)
downloadiii-client-95f269594837ec1a137d5876e4517a844806a5bf.tar.xz
iii-client-95f269594837ec1a137d5876e4517a844806a5bf.zip
Added code minimization
Diffstat (limited to 'package.json')
-rw-r--r--package.json10
1 files changed, 7 insertions, 3 deletions
diff --git a/package.json b/package.json
index 95aba53..c961ff8 100644
--- a/package.json
+++ b/package.json
@@ -22,19 +22,23 @@
"iii",
"bot"
],
- "main": "./lib/index.js",
+ "main": "./dist/standalone.js",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-core": "^6.24.1",
"babel-loader": "^7.1.2",
"babel-preset-es2015": "^6.24.1",
"eslint": "^3.19.0",
+ "uglify-js": "^3.1.2",
"webpack": "^3.6.0"
},
"scripts": {
- "build-node": "babel --out-file ./dist/index.js ./src/index.js",
+ "minify-standalone": "uglifyjs --mangle --compress --toplevel --source-map --output dist/standalone.min.js dist/standalone.js",
+ "minify-browser": "uglifyjs --mangle --compress --toplevel --source-map --output dist/bundle.min.js dist/bundle.js",
+ "minify": "npm run minify-browser && npm run minify-standalone",
+ "build-standalone": "babel --out-file dist/standalone.js src/index.js",
"build-browser": "webpack --config webpack.config.js",
- "build": "npm run build-browser && npm run build-node",
+ "build": "npm run build-browser && npm run build-standalone",
"check": "eslint ./src/*"
}
}