-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
executable file
·66 lines (61 loc) · 1.46 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
module.exports = (grunt) ->
grunt.initConfig
coffee:
dist:
expand: true
flatten: false
cwd: "src/js"
src: ["**/*.coffee"]
dest: 'build/js'
ext: ".js"
spec:
expand: true
flatten: false
cwd: "spec/js"
src: ["**/*.coffee"]
dest: 'build/js'
ext: ".js"
haml:
dist:
expand: true
flatten: false
cwd: 'src'
src: ['**/*.haml']
dest: 'build'
ext: '.html'
spec:
expand: true
flatten: false
cwd: 'spec'
src: ['**/*.haml']
dest: 'build'
ext: '.html'
copy:
main:
expand: true
cwd: "src/css"
src: ["*.css"]
dest: 'build/css'
watch:
coffee:
files: ["src/js/**/*.coffee","spec/js/**/*.coffee"]
tasks: ["compile:coffee"]
haml:
files: ["src/**/*.haml"]
tasks: ["compile:haml"]
static:
files: ['src/css/*']
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.registerTask 'compile', ['coffee', 'haml', 'copy']
grunt.registerTask 'server', ['compile','connect:server', 'watch']