-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
111 lines (95 loc) · 2.18 KB
/
Gruntfile.js
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
'use strict';
module.exports = function(grunt) {
//Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js'
],
options: {
jshintrc: '.jshintrc'
}
},
coffee: {
options: {
bare: true
},
index: {
files: {
'app/js/controllers/index.js' : [
'coffeescript/controllers/*.coffee'
]
}
},
rubyHaml: {
glob_to_multiple: {
expand: true,
cwd: 'haml/',
src: ['*.haml'],
dest: 'app/',
ext: '.html'
}
},
glob_to_multiple: {
expand: true,
cwd: 'coffee/',
src: ['*.coffee','controllers/*.coffee','models/*.coffee','views/*.coffee'],
dest: 'app/js/',
ext: '.js'
}
},
sass: {
glob_to_multiple: {
expand: true,
cwd: 'sass/',
src: ['*.scss'],
dest: 'app/css/',
ext: '.css'
}
},
rubyHaml: {
glob_to_multiple: {
expand: true,
cwd: 'haml/',
src: ['*.haml'],
dest: 'app/',
ext: '.html',
},
options: {
templatize: false
}
},
nodeunit: {
tests: ['app/js/controllers/*.js']
},
//Watch
watch: {
coffeesrc: {
files: ['coffee/**/*.coffee'],
tasks: ['coffee','rubyHaml']
},
haml: {
files: ['haml/**/*.haml'],
tasks: ['rubyHaml']
},
sass: {
files: ['sass/**/*.scss'],
tasks: ['sass']
}
}
});
grunt.loadTasks('grunt-tasks');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-internal');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-ruby-haml');
grunt.registerTask('test', [
'coffee',
'sass',
'jshint',
'rubyHaml'
]);
grunt.registerTask('default', ['test']);
};