-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
45 lines (38 loc) · 930 Bytes
/
gruntfile.js
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
34
35
36
37
38
39
40
41
42
43
44
45
module.exports = function(grunt) {
var src = "src/",
jsFiles = [
"jetro.js",
//"modules/slider/slider.std.js",
"modules/modal/modal.std.js"
];
for (var i=0, file; file = jsFiles[i]; i++) {
jsFiles[i] = src+file;
}
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
dist: "dist/",
uglify: {
minify: {
options: {
sourceMap: true,
sourceMapName: "<%= dist %>sourcemap.map"
},
files: {
"<%= dist %><%= pkg.name %>.min.js": jsFiles
}
}
},
watch: {
scripts: {
files: jsFiles,
tasks: ["uglify"],
options: {
livereload: 35729
}
}
}
});
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.registerTask("default", ["uglify", "watch"]);
};