-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathGruntfile.coffee
123 lines (105 loc) · 3.24 KB
/
Gruntfile.coffee
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
grunt.initConfig
pkg : grunt.file.readJSON 'package.json'
path :
src : 'src'
dist : 'dist'
exec :
install :
cmd : 'bourbon install --path=<%= path.src %>/sass'
clean :
dist :
dot : true
src : [
'<%= path.dist %>'
]
copy :
static :
expand : true
cwd : '<%= path.src %>'
dest : '<%= path.dist %>'
src : [
'manifest.json'
'*.html'
'{_locales,image,font,css,js}/**/*.*'
]
imagemin :
options :
pngquant : true
dist :
expand : true
cwd : '<%= path.src %>/image'
dest : '<%= path.dist %>/image'
src : [ '**/*.{png,jpg,gif}' ]
coffee :
dist :
expand : true
cwd : '<%= path.src %>/coffee'
dest : '<%= path.dist %>/js'
src : [ '**/*.coffee' ]
ext : '.js'
extDot : 'last'
sass :
dist :
options :
unixNewlines : true
expand : true
cwd : '<%= path.src %>/sass'
dest : '<%= path.dist %>/css'
src : [ '**/*.sass', '!**/_*.sass' ]
ext : '.css'
extDot : 'last'
concurrent :
dist : [
'copy:static'
'coffee'
'sass'
]
uglify :
dist :
files : [{
expand : true
cwd : '<%= path.dist %>/js'
dest : '<%= path.dist %>/js'
src : [ '**/*.js' ]
ext : '.js'
extDot : 'last'
}]
cssmin :
dist :
files : [{
expand : true
cwd : '<%= path.dist %>/css'
dest : '<%= path.dist %>/css'
src : [ '**/*.css' ]
ext : '.css'
extDot : 'last'
}]
watch :
copyStatic :
files : [
'<%= path.src %>/manifest.json'
'<%= path.src %>/*.html'
'<%= path.src %>/{_locales,image,font,css,js}/**/*.*'
]
tasks : [ 'copy:static' ]
coffee :
files : [ '<%= path.src %>/coffee/**/*.coffee' ]
tasks : [ 'coffee' ]
sass :
files : [ '<%= path.src %>/sass/**/*.sass' ]
tasks : [ 'sass' ]
grunt.registerTask 'default', [
'exec:install'
'clean:dist'
'concurrent:dist'
]
grunt.registerTask 'release', [
'exec:install'
'clean:dist'
'concurrent:dist'
'imagemin'
'uglify'
'cssmin'
]