-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
137 lines (123 loc) · 3.15 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
module.exports = (grunt) ->
(require 'load-grunt-tasks') grunt
grunt.initConfig
pkg:grunt.file.readJSON('package.json')
coffee:
options:
bare:true
build:
expand:true
cwd:'src'
src:'**/*.coffee'
dest:'www/'
ext:'.js'
jade:
options:
pretty:true
doctype:'html'
build:
expand:true
cwd:'src/'
src:'**/*.jade'
dest:'www/'
ext:'.html'
compass:
build:
options:
sassDir:'src'
cssDir:'www'
watch:
files:
expand:true
files:['src/**/**','!**/*.jade','!**/*.coffee','!**/*.sass']
tasks:['newer:copy']
jstemplate:
files:['src/app/components/**/*.jade']
tasks:['newer:jade','ngtemplates']
inithtml:
files:['src/index.jade']
tasks:['newer:jade', 'sails-linker']
options:
livereload:true
js:
files:['src/**/*.coffee']
tasks:['newer:coffee']
css:
files:['src/**/*.sass']
tasks:['compass']
jscssindex:
files:['www/**/*.js', 'www/**/*.css']
tasks:['sails-linker']
options:
livereload:true
copy:
build:
expand:true
cwd:'src/'
src:['**/*.{json,svg,png,gif,jpg,ttf,html,js,css}']
dest:'www/'
dist:
expand:true
cwd:'www/'
src:['**/*.{json,svg,png,gif,jpg,ttf,html,js,css}']
dest:'dist/'
clean:
build:
src:['www/**/*']
dist:
src:['dist/**/*']
wiredep:
target:
src:['src/index.jade']
cwd: ''
dependencies: true
devDependencies: false
exclude: []
fileTypes: {}
ignorePath: 'src/'
karma:
unit:
configFile:'karma.conf.js'
autorun:true
# protractor:
# options:
# #configFile: 'npm_modules/protractor/examples/conf.js'
# keepAlive: true
# noColor: false
# verbose:true
# debug: true
# args:
# specs:['test/e2e/**/*.js']
connect:
server:
options:
port:8000
hostname:'0.0.0.0'
base:'www'
keepalive:true
livereload:true
'sails-linker':
js:
options:
startTag: '<!--start scripts-->'
endTag: '<!--end scripts-->'
fileTmpl: '<script src="%s"></script>'
appRoot: 'www/'
##TODO clarify the js dependencies
files:
'www/index.html': ['www/app/assets/**/*.js', 'www/app/**/*.js','www/app/components/**/*.js']
css:
options:
startTag: '<!--start css-->'
endTag: '<!--end css-->'
fileTmpl: '<link rel="stylesheet" href="%s">'
appRoot: 'www/'
files:
'www/index.html': [ 'www/app/**/*.css']
ngtemplates:
app:
cwd: 'www/app'
src: 'components/**/*.html'
dest: 'www/app/templates.js'
grunt.registerTask 'build', ['wiredep', 'newer:jade:build','newer:coffee:build','compass:build', 'newer:copy:build', 'ngtemplates','sails-linker']
grunt.registerTask 'unit', ['karma']