forked from andmm/live-bomb
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.coffee
99 lines (85 loc) · 3.05 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
module.exports = (grunt) ->
"use strict"
grunt.initConfig
clean: ["dist/"]
copy:
release:
files: [
{
src: [
'manifest.json'
'popup.html'
'css/*.css'
'images/**'
'sounds/**'
]
dest: 'dist'
filter: 'isFile'
expand: true
},
{
src: [
'fonts/**'
]
cwd: 'vendor/bower/fontawesome/'
dest: 'dist'
filter: 'isFile'
expand: true
}
]
less:
dist:
options:
cleancss: true
paths: ['css']
files:
'dist/css/style.min.css': 'css/app.less'
uglify:
dist:
# options:
# # For debugging/testing
# beautify: true
# preserveComments: true;
files:
'dist/js/common.min.js': [
'js/lib/ga.js'
'vendor/bower/jquery/dist/jquery.js'
'vendor/bower/countdown/dest/jquery.countdown.js'
'vendor/bower/jQuery-Storage-API/jquery.storageapi.js'
'js/functions.js'
]
'dist/js/background.min.js': [
'vendor/bower/moment/moment.js'
'vendor/bower/moment-timezone/builds/moment-timezone-with-data-2010-2020.js'
'js/background-functions.js'
'js/background-main.js'
]
'dist/js/frontend.min.js': [
'vendor/bower/bootstrap/js/button.js'
'vendor/bower/bootstrap/js/tab.js'
'vendor/bower/jquery.slimscroll/jquery.slimscroll.js'
'js/livebomb.js'
]
watch:
less:
files: ['css/*.less']
tasks: ['less']
copy:
files: ['manifest.json', 'popup.html', 'css/*.css', 'images/*', 'sounds/*']
tasks: ['copy']
uglify:
files: ['js/*']
tasks: ['uglify']
# Grunt Contrib Tasks
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-contrib-copy"
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.loadNpmTasks "grunt-contrib-less"
# Grunt Tasks
grunt.registerTask "default", [
"clean", "copy", "less", "uglify"
]
grunt.registerTask "dev", [
"clean", "copy", "less", "uglify", "watch"
]