diff --git a/gulpfile.js b/gulpfile.js index 12ac053c5072fedbc33ce4ece264a723c4cd0166_Z3VscGZpbGUuanM=..e5fbb17fbb8ae25c3c6b480435eccfa4c470e686_Z3VscGZpbGUuanM= 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,4 +1,5 @@ var gulp = require('gulp'); +var uglify = require('gulp-uglify'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var cleanCSS = require('gulp-clean-css'); @@ -8,12 +9,12 @@ gulp.task('js', function() { gulp.src([ - 'node_modules/jquery/dist/jquery.slim.min.js', - 'node_modules/popper.js/dist/umd/popper.min.js', - 'node_modules/bootstrap/dist/js/bootstrap.min.js', - 'node_modules/wowjs/dist/wow.min.js', + 'node_modules/jquery/dist/jquery.slim.js', + 'node_modules/popper.js/dist/umd/popper.js', + 'node_modules/bootstrap/dist/js/bootstrap.js', + 'node_modules/wowjs/dist/wow.js', 'node_modules/leaflet/dist/leaflet.js', 'js/wow.js', 'js/highlight.pack.js', 'js/highlight.js', 'js/map.js']) @@ -15,6 +16,8 @@ 'node_modules/leaflet/dist/leaflet.js', 'js/wow.js', 'js/highlight.pack.js', 'js/highlight.js', 'js/map.js']) + .pipe(sourcemaps.init()) + .pipe(gulp.dest('static/js/')) .pipe(concat('all.js')) @@ -20,4 +23,6 @@ .pipe(concat('all.js')) + .pipe(uglify()) + .pipe(sourcemaps.write('.')) .pipe(gulp.dest('static/js/')); }); diff --git a/package.json b/package.json index 12ac053c5072fedbc33ce4ece264a723c4cd0166_cGFja2FnZS5qc29u..e5fbb17fbb8ae25c3c6b480435eccfa4c470e686_cGFja2FnZS5qc29u 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "gulp-rename": "^1.2.2", "gulp-sass": "^3.1.0", "gulp-sourcemaps": "^2.6.4", + "gulp-uglify": "^3.0.1", "html5shiv": "^3.7.3", "jquery": "^3.3.1", "leaflet": "^1.3.4",