-
Notifications
You must be signed in to change notification settings - Fork 2
/
gruntfile.js
executable file
·69 lines (68 loc) · 1.69 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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-express-server');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.initConfig({
clean: ["public/js"],
uglify: {
my_target: {
options: {
mangle: false
},
files: {
'public/js/script.js': ['js/script.js'],
'public/js/controllers.js': ['js/controllers.js'],
'public/js/app.js': ['js/app.js'],
'public/js/services.js': ['js/services.js'],
'public/js/materialize.js': ['js/materialize.js']
} //files
} //my_target
}, //uglify
copy: {
files: {
expand : true,
dest : 'public/js',
cwd : 'js',
src : [
'**/*.js'
]
}
},
compass: {
dev: {
options: {
config: 'compass_config.rb'
} //options
}
}, //compass
watch: {
options: { livereload: true },
scripts: {
files: ['js/*.js'],
//tasks: ['clean','uglify'],
tasks: ['copy']
}, //script
sass: {
files: ['sass/*.scss', 'sass/components/*.scss'],
tasks: ['compass:dev']
},
html: {
files: ['public/*.html', 'public/partials/*.html']
}
}, //watch
express: {
options: {
// Override defaults here
},
dev: {
options: {
script: 'app.js'
}
}
}
}) //initConfig
grunt.registerTask('default', ['express:dev', 'watch']);
} //exports