-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathGruntfile.coffee
37 lines (33 loc) · 902 Bytes
/
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
module.exports = (grunt) ->
grunt.initConfig
watch:
options:
livereload: true
express:
files: 'src/server.coffee'
tasks: ['express:dev']
options:
spawn: false
coffee:
files: ['src/main.coffee']
tasks: ['coffee']
html:
files: '*.html'
js:
files: '*.js'
express:
dev:
options:
port: process.env.PORT ? 3001
opts: ['node_modules/coffee-script/bin/coffee']
script: 'src/server.coffee'
coffee:
build:
files:
'main.js': 'src/main.coffee'
'server.js': 'src/server.coffee'
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks "grunt-express-server"
grunt.registerTask 'default', ['coffee']
grunt.registerTask 'dev', ['coffee', 'express:dev', 'watch']