forked from diazemiliano-zz/googlemaps-scrollprevent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
33 lines (30 loc) · 732 Bytes
/
gulpfile.js
File metadata and controls
33 lines (30 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Plugins
var
gulp = require("gulp"),
util = require("gulp-util"),
watch = require("gulp-watch"),
uglify = require("gulp-uglify"),
concat = require("gulp-concat"),
changed = require("gulp-changed"),
// Custom paths
myPaths = {
js:{
name:"mapScrollPrevent",
src:"./src/**/*.js",
dest:"./dist/"
}
}
;
// Compress JavaScript
gulp.task("compress", function() {
gulp.src(myPaths.js.src)
.pipe(uglify({ preserveComments:"some" }))
.pipe(concat(myPaths.js.name+".min.js"))
.pipe(gulp.dest(myPaths.js.dest));
});
// Watch for Changes
gulp.task("watch", function() {
gulp.watch([myPaths.js.src], ["compress"]);
});
// Do Tasks as Default
gulp.task("default", ["compress", "watch"]);