-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
84 lines (82 loc) · 1.62 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
74
75
76
77
78
79
80
81
82
83
84
module.exports = function(grunt) {
grunt.initConfig({
pkg:grunt.file.readJSON('package.json'),
coffee:{ //Task
compile: { //Target
files: { //Target options
'dist/js/main.js' : 'coffee/main.coffee'
}
}
},
uglify: {
options: {
sourceMap: true,
mangle: {
except: ['jQuery', 'AUI', '$']
},
compress: {
drop_console: true
}
},
my_target: {
files: [{
expand: true,
cwd: 'dist/js',
src: ['*.js','!_*.min.js'],
dest: 'dist/js/min'
}]
}
},
jshint: {
options: {
curly: true,
eqeqeq: true,
eqnull: true,
browser: true,
globals: { // Map of var_name : is assignable
jQuery: true,
$: true,
window: false,
AUI: true
},
},
all: ['Gruntfile.js', 'dist/js/*.js']
},
sass:{ // Task
dist: { // Target
options: { // Target options
style: 'compressed',
sourcemap: true,
precision: 5
},
files: [{
expand: true,
cwd: 'sass',
src: ['*.scss','!_*.scss'],
dest: 'dist/css',
ext: '.css'
}]
}
},
csscomb: {
dist: {
options: {
config: 'csscomb.json'
},
files: [{
expand: true,
cwd: 'sass',
src: ['*.scss'],
dest: 'sass',
ext: '.scss'
}]
}
}
});
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify'); //Need to add more .js and contrib-concat
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-csscomb');
grunt.registerTask('default', ['coffee','uglify','jshint','csscomb','sass']);
};