-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
58 lines (51 loc) · 1.24 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
module.exports = (grunt) ->
grunt.initConfig
haml:
dist:
expand: true
flatten: false
cwd: 'src'
src: ['**/*.haml']
dest: 'build'
ext: '.html'
copy:
main:
expand: true
cwd: 'src'
src: ['*/*']
dest: 'build'
coffee:
dist:
expand: true
flatten: false
cwd: "src/js"
src: ["**/*.coffee"]
dest: 'build/js'
ext: ".js"
concurrent:
dist:
['watch']
watch:
haml:
files: ["src/*.haml"]
tasks: ["compile:haml"]
coffee:
files: ["src/js/**/*.coffee"]
tasks: ["compile:coffee"]
static:
files: ['src/*/*']
tasks: ["compile:copy"]
connect:
server:
options:
port: 8000
base: 'build'
#Load Tasks
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-haml2html'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-concurrent'
grunt.registerTask 'compile', ['haml', 'copy', 'coffee']
grunt.registerTask 'server', ['connect:server', 'watch', 'compile', 'concurrent:dist']