-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.coffee
122 lines (108 loc) · 4.06 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
module.exports= (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
clean:
all: ['<%= pkg.config.build.app.root %>/']
coffee:
main:
options:
bare: true
files: [{
expand: true
cwd: '<%= pkg.config.build.src.root %>'
src: ['**/*.coffee']
dest: '<%= pkg.config.build.app.root %>'
ext: '.js'
}]
yaml:
package:
options:
ignored: /^_/
space: 2
files: [{
expand: true
cwd: '<%= pkg.config.build.src.root %>'
src: ['**/*.yaml', '**/*.yml', '!**/views/**']
dest: '<%= pkg.config.build.app.root %>/'
ext: '.json'
}]
jade:
compile:
options:
data:
debug: false
files: [{
expand: true
cwd: '<%= pkg.config.build.src.node %>/views/templates'
src: ['**/*.jade', '!**/layout.jade']
dest: '<%= pkg.config.build.app.node %>/views/templates'
ext: '.html'
}]
less:
compile:
files: [{
expand: true
cwd: '<%= pkg.config.build.src.node %>/views/assets/styles'
src: ['**/*.less']
dest: '<%= pkg.config.build.app.node %>/views/assets/styles'
ext: '.css'
}]
copy:
views:
files: [{
expand: true
cwd: '<%= pkg.config.build.src.node %>/views/assets'
src: ['**/*', '!**/components/**', '!**/*.less', '!**/*.jade', '!**/*.coffee', '!**/*.md']
dest: '<%= pkg.config.build.app.node %>/views/assets'
}, {
expand: true
cwd: '<%= pkg.config.build.src.node %>/views/assets/components/font-awesome/font'
src: ['**/*']
dest: '<%= pkg.config.build.app.node %>/views/assets/fonts/awesome'
}]
sql:
files: [{
expand: true
cwd: '<%= pkg.config.build.src.node %>/db/sql'
src: ['**/*.sql']
dest: '<%= pkg.config.build.app.node %>/db/sql'
}]
watch:
scripts:
files: '<%= pkg.config.build.src.node %>/views/assets/**/*'
tasks: ['jade', 'less', 'copy:views']
options:
event: ['added', 'deleted', 'changed']
#coffeelint:
# app:
# options:
# indentation:
# level: 'error'
# value: 4
# line_endings:
# value: 'unix'
# level: 'error'
# max_line_length:
# level: 'warn'
# files: [
# {
# src: '<%= pkg.config.build.src.root %>/**/*.coffee'
# }
# ]
#docco:
# debug:
# src: ['**/*.coffee'],
# options:
# output: 'spec/docs/'
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-coffeelint'
#grunt.loadNpmTasks 'grunt-docco'
grunt.registerTask 'default', ['clean', 'yaml', 'coffee', 'jade', 'less', 'copy']
#grunt.registerTask 'lint', ['coffeelint']
#grunt.registerTask 'doc', ['docco']