-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.coffee
107 lines (96 loc) · 3.52 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
module.exports= (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
clean:
all: ['<%= pkg.config.app.node %>/']
coffee:
main:
options:
bare: true
files: [{
expand: true
cwd: '<%= pkg.config.src.root %>'
src: ['**/*.coffee']
dest: '<%= pkg.config.app.root %>'
ext: '.js'
}]
yaml:
package:
options:
ignored: /^_/
space: 2
files: [{
expand: true
cwd: '<%= pkg.config.src.root %>'
src: ['**/*.yaml', '**/*.yml', '!**/views/**']
dest: '<%= pkg.config.app.root %>/'
ext: '.json'
}]
jade:
compile:
options:
data:
debug: false
files: [{
expand: true
cwd: '<%= pkg.config.src.views.templates.cwd %>'
src: ['**/*.jade', '!**/layout.jade']
dest: '<%= pkg.config.app.views.templates.cwd %>'
ext: '.html'
}]
less:
compile:
files: [{
expand: true
cwd: '<%= pkg.config.src.views.assets.cwd %>/styles'
src: ['**/*.less']
dest: '<%= pkg.config.app.views.assets.cwd %>/styles'
ext: '.css'
}]
copy:
views:
files: [{
expand: true
cwd: '<%= pkg.config.src.views.assets.cwd %>'
src: ['**/*', '!**/components/**', '!**/*.less', '!**/*.jade', '!**/*.coffee', '!**/*.md']
dest: '<%= pkg.config.app.views.assets.cwd %>'
}, {
expand: true
cwd: '<%= pkg.config.src.views.assets.cwd %>/components/font-awesome/font'
src: ['**/*']
dest: '<%= pkg.config.app.views.assets.cwd %>/fonts/awesome'
}]
sql:
files: [{
expand: true
cwd: '<%= pkg.config.src.node %>/db/sql'
src: ['**/*.sql']
dest: '<%= pkg.config.app.node %>/db/sql'
}]
docco:
debug:
src: ['**/*.coffee'],
options:
output: 'spec/docs/'
watch:
jade:
files: ['**/*.jade', '**/*.coffee']
tasks: ['jade']
options:
cwd: '<%= pkg.config.src.views.templates.cwd %>'
less:
files: ['**/*.less']
tasks: ['less']
options:
cwd: '<%= pkg.config.src.views.assets.cwd %>'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-jade'
grunt.loadNpmTasks 'grunt-contrib-less'
grunt.loadNpmTasks 'grunt-yaml'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-docco'
grunt.registerTask 'default', ['clean', 'yaml', 'coffee', 'jade', 'less', 'copy']
grunt.registerTask 'dev', ['watch']
grunt.registerTask 'doc', ['docco']