-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
79 lines (68 loc) · 1.69 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compile:
files: [
expand: true
cwd: "assets/coffee"
src: ["**/*.coffee"]
dest: "assets/js"
ext: ".js"
]
connect:
server:
options:
port: 9000
base: ""
handlebars:
compile:
options:
namespace: "JST"
processName: (filePath) ->
filePath.replace("assets/coffee/apps/", "").replace ".hbs", ""
files:
"assets/js/templates.js": "assets/coffee/**/*.hbs"
sass:
dist:
options:
outputStyle: "nested"
includePaths: ["bower_components/bourbon/app/assets/stylesheets"]
files:
"assets/css/app.css": "assets/scss/app.scss"
watch:
handlebars:
files: "assets/coffee/**/*.hbs"
tasks: ["handlebars"]
options:
spawn: false
sass:
files: ["assets/scss/**/*.scss"]
tasks: ["sass"]
options:
livereload: false
coffee:
files: "assets/coffee/**/*.coffee"
tasks: ["coffee"]
options:
spawn: false
css:
files: ["assets/css/app.css"]
tasks: []
options:
livereload: true
grunt:
files: ["Gruntfile.coffee"]
grunt.loadNpmTasks "grunt-sass"
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-contrib-connect"
grunt.loadNpmTasks "grunt-contrib-handlebars"
grunt.registerTask "build", [
"sass"
"coffee"
]
grunt.registerTask "default", [
"watch"
]
return