-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathGruntfile.coffee
44 lines (38 loc) · 1.08 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
glob_to_multiple:
expand: true
cwd: 'src'
src: ['**/*.coffee']
dest: 'lib'
ext: '.js'
coffeelint:
options:
max_line_length:
level: 'ignore'
src: ['src/**/*.coffee']
watch:
express:
files: ['**/*.coffee', '**/*.handlebars']
tasks: ['express:dev']
options:
spawn: no
express:
dev:
options:
opts: ['node_modules/coffee-script/bin/coffee']
cmd: process.argv[0]
script: 'src/app.coffee'
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-express-server')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-shell')
grunt.loadNpmTasks('grunt-coffeelint')
grunt.registerTask('lint', ['coffeelint'])
grunt.registerTask('default', ['coffee', 'lint'])
grunt.registerTask 'clean', ->
rm = require('rimraf').sync
rm('lib')
grunt.registerTask('serve', ['express', 'watch'])