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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
dentist: {
options: {
include_js: "app.min.js",
include_css: "app.css",
clean_scripts: true,
},
build: {
src: 'falling/index.html',
dest_js: 'app.init.js',
dest_css: 'app.css',
dest_html: 'index.html'
}
},
concat: {
options: {
separator: ";"
},
build: {
src: [
"js/vendor/jquery-1.10.2.min.js",
"js/vendor/jquery-nodoubletapzoom.js",
"js/vendor/mx.min.js",
"js/vendor/mx.gyroControl.js",
"js/vendor/mx.rotationControl.js",
"js/vendor/mx.scene.js",
"js/util.js",
"js/image.js",
"app.init.js",
],
dest: 'app.concat.js',
}
},
uglify: {
options: {
banner: '/* asdf.us/trees */\n'
},
build: {
src: 'app.concat.js',
dest: 'app.min.js'
}
},
clean: {
release: ["app.concat.js","app.init.js"],
},
watch: {
files: ['!(app.min|app.concat).js'],
tasks: ['default']
}
});
// Load tasks that we'll be using
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-dentist');
// Default task(s).
grunt.registerTask('build', ['dentist:build', 'concat:build', 'uglify:build']);
grunt.registerTask('default', ['build', 'clean:release']);
};
|