aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <felix.sipma@no-log.org>2018-02-09 09:22:05 +0100
committerFélix Sipma <felix.sipma@no-log.org>2018-02-09 09:22:05 +0100
commita25946d570d981a19e0bfef8adc9d35d58fdf085 (patch)
tree51a31a0a7052dd9d4d837b9b58f61e19a930464b
parent25ede29ed4099488387102a2a3a9b782deb70ea0 (diff)
js: use uglifyjs
-rw-r--r--Makefile7
-rw-r--r--package-lock.json14
-rw-r--r--package.json2
3 files changed, 12 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index b7b3f5c..2d2eee9 100644
--- a/Makefile
+++ b/Makefile
@@ -28,13 +28,14 @@ js:
mkdir -p $(DIST_STATIC)/js
cat \
node_modules/leaflet/dist/leaflet.js \
- node_modules/jquery/dist/jquery.min.js \
- node_modules/popper.js/dist/umd/popper.min.js \
+ node_modules/jquery/dist/jquery.js \
+ node_modules/popper.js/dist/umd/popper.js \
node_modules/bootstrap/js/dist/util.js \
node_modules/bootstrap/js/dist/collapse.js \
$(STATIC)/js/* \
> $(TMP)/js/fournil.js
- cp $(TMP)/js/fournil.js $(DIST_STATIC)/js
+ uglifyjs --compress --mangle -o $(TMP)/js/fournil.min.js $(TMP)/js/fournil.js
+ cp $(TMP)/js/fournil.min.js $(DIST_STATIC)/js
fonts:
mkdir -p $(DIST_STATIC)/fonts
diff --git a/package-lock.json b/package-lock.json
index 0c20568..3c818e4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,9 +10,9 @@
"integrity": "sha512-gulJE5dGFo6Q61V/whS6VM4WIyrlydXfCgkE+Gxe5hjrJ8rXLLZlALq7zq2RPhOc45PSwQpJkrTnc2KgD6cvmA=="
},
"commander": {
- "version": "2.13.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz",
- "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA=="
+ "version": "2.14.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz",
+ "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw=="
},
"font-awesome": {
"version": "4.7.0",
@@ -40,11 +40,11 @@
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"uglify-js": {
- "version": "3.3.9",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.9.tgz",
- "integrity": "sha512-J2t8B5tj9JdPTW4+sNZXmiIWHzTvcoITkaqzTiilu/biZF/9crqf/Fi7k5hqbOmVRh9/hVNxAxBYIMF7N6SqMQ==",
+ "version": "3.3.10",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.10.tgz",
+ "integrity": "sha512-dNib7aUDNZFJNTXFyq0CDmLRVOsnY1F+IQgt2FAOdZFx2+LvKVLbbIb/fL+BYKCv3YH3bPCE/6M/JaxChtQLHQ==",
"requires": {
- "commander": "2.13.0",
+ "commander": "2.14.1",
"source-map": "0.6.1"
}
}
diff --git a/package.json b/package.json
index 411d4ce..7066e56 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
"jquery": "^3.3.1",
"leaflet": "^1.3.1",
"popper.js": "^1.12.9",
- "uglify-js": "^3.3.8"
+ "uglify-js": "^3.3.10"
},
"devDependencies": {},
"scripts": {