forked from xge/chat.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
78 lines (77 loc) · 2.32 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
module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
coffeelint:
options:
configFile: 'coffeelint.json'
app: ['app/**/*.coffee'],
server: ['lib/**/*.coffee']
coffee:
app:
options:
join: true
sourceMap: true
files:
'build/app/js/app.js': ['app/**/*.coffee']
concat:
dev:
src: [
'bower_components/angular/angular.js'
'bower_components/angular-route/angular-route.js'
'bower_components/angular-sanitize/angular-sanitize.js'
'bower_components/ng-emoticons/ng-emoticons.js'
'bower_components/angular-socket-io/socket.js'
],
dest: 'build/app/js/lib.js'
prod:
src: [
'bower_components/angular/angular.min.js'
'bower_components/angular-route/angular-route.min.js'
'bower_components/angular-sanitize/angular-sanitize.min.js'
'bower_components/ng-emoticons/dist/ng-emoticons.min.js'
'bower_components/angular-socket-io/socket.min.js'
],
dest: 'build/app/js/lib.min.js'
copy:
fonts:
files: [{
expand: true
flatten: true
src: ['bower_components/ng-emoticons/fonts/*']
dest: 'build/app/fonts/'
filter: 'isFile'
}]
index:
files:
'build/app/index.html': 'app/index.html'
jquery:
files: [{
expand: true
flatten: true
src: ['bower_components/jquery/dist/*']
dest: 'build/app/js/'
filter: 'isFile'
}]
html2js:
options:
base: 'app/'
module: 'chat.tpl'
useStrict: true
app:
src: ['app/**/*.tpl.html']
dest: 'build/app/js/tpl.js'
less:
app:
files:
'build/app/css/app.css': 'app/less/app.less'
watch:
assets:
files: ['app/less/app.less', 'app/**/*.tpl.html', 'app/index.html']
tasks: ['assets']
coffee:
files: ['app/**/*.coffee']
tasks: ['coffeescript']
grunt.registerTask 'coffeescript', ['coffeelint', 'coffee']
grunt.registerTask 'assets', ['less', 'html2js', 'concat', 'copy']
grunt.registerTask 'default', ['coffeescript', 'assets']