-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgruntfile.coffee
66 lines (53 loc) · 1.18 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
module.exports = (g) ->
static_files = [
'index.html'
'css/**'
'img/**'
]
g.initConfig
config:
package: g.file.readJSON 'package.json'
clean: [ 'dist' ]
watch:
build:
files: 'src/**'
tasks: ['build']
tdd:
files: [
'src/**/*.coffee'
'test/**/*.coffee'
]
tasks: ['tdd']
coffee:
compile:
expand: true
options:
sourceMap: true
bare: true
cwd: 'src'
src: ['**/*.coffee']
dest: 'dist/js'
ext: '.js'
browserify:
all:
src: ['dist/js/app.js']
dest: 'dist/doble9.js'
copy:
static:
expand: true
cwd: 'src'
src: static_files
dest: 'dist/'
connect:
doble9:
options:
port: 99
base: 'dist'
shell:
mocha: command: 'mocha'
require('load-grunt-tasks') g
g.option 'force', true
g.registerTask('build', ['clean', 'coffee', 'browserify', 'copy'])
g.registerTask('tdd', ['shell:mocha', 'watch:tdd'])
g.registerTask('server', ['build', 'connect', 'watch:build'])
g.registerTask('default', ['server'])