-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
73 lines (70 loc) · 1.96 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
build: {
files: {
'build/scripts/app.bundle.js': ['app/lib/main.js']
}
}
},
copy: {
scripts: {
src: [
'bower_components/easeljs/lib/easeljs-0.8.2.combined.js',
],
dest: 'build/scripts/',
expand: true,
flatten: true
},
html: {
src: [
'app/index.html',
],
dest: 'build/',
expand: true,
flatten: true
},
css: {
src: [
'app/css/main.css',
],
dest: 'build/css/',
expand: true,
flatten: true
},
images: {
expand: true,
dest: 'build/img/',
cwd: 'app/img/',
src: '**/*.*'
}
},
connect: {
server: {
options: {
port: 9001,
base: 'build'
}
}
},
watch: {
options: {
livereload: true
},
scripts: {
files: ['app/lib/**/*.js', 'app/*.html', 'app/css/*.css'],
tasks: ['build']
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-browserify');
// Default task(s).
grunt.registerTask('build', ['browserify', 'copy']);
grunt.registerTask('default', ['build', 'connect', 'watch']);
};