-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
53 lines (44 loc) · 1.48 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
js: {
src: ['src/app.js', 'src/router.js', 'src/models/*.js', 'src/routes/decks_route.js', 'src/**/*.js'],
dest: 'build/<%= pkg.name %>.js'
}
},
emberTemplates: {
compile: {
options: {
templateName: function(sourceFile){
return sourceFile.replace(/src\/templates\//, '').replace('_', '/');
}
},
files: {
'build/<%= pkg.name %>.templates.js': ['src/templates/**/*.hbs']
}
}
},
watch: {
default: {
files: ["src/**/*.js", "src/templates/**/*.hbs", "css/*.scss"],
tasks: ["default"]
}
},
sass:{
default: {
options: {
lineNumbers: true
},
files: {
"css/emberFlashcards.css": ["css/emberFlashcards.scss"]
}
}
}
});
grunt.loadNpmTasks('grunt-ember-templates');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.registerTask('default', ['concat', 'emberTemplates', 'sass', 'watch']);
}