-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathGruntfile.coffee
69 lines (61 loc) · 1.39 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
path = require('path')
module.exports = (grunt) ->
grunt.initConfig({
express: {
server: {
options: {
bases: path.resolve('web/public')
debug: true
server: path.resolve('./server.coffee')
monitor: {
command: 'coffee'
}
}
}
}
coffee: {
compile: {
files: [
expand: true
cwd: 'web/'
src: '**/*.coffee'
dest: 'web/public/js/'
ext: '.js'
]
}
}
jade: {
compile: {
options: {
client: true
namespace: false
amd: true
}
files: [
expand: true
cwd: 'web/templates'
src: '**/*.jade'
dest: 'web/public/js/templates'
ext: '.js'
]
}
}
watch: {
coffee: {
files: 'web/**/*.coffee'
tasks: ['coffee']
}
jade: {
files: 'web/templates/*.jade'
tasks: ['jade']
}
}
})
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-jade')
grunt.loadNpmTasks('grunt-contrib-requirejs')
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-express')
grunt.registerTask('build', 'coffee jade stylus requirejs')
grunt.registerTask('build-dev', 'coffee jade')
grunt.registerTask('default', ['express', 'watch'])