-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathGruntfile.js
28 lines (24 loc) · 893 Bytes
/
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
function config(name) {
return require('./tasks/' + name + '.js');
}
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: config('concat'),
jshint: config('jshint'),
emberTemplates: config('emberTemplates'),
uglify: config('uglify'),
server: config('server'),
watch: {
files: ['templates/**/*.hbs', 'app.js', 'app/**/*.js'],
tasks: ['emberTemplates', 'concat']
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-ember-templates');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('dist', ['jshint', 'emberTemplates', 'concat', 'uglify']);
grunt.registerTask('default', ['watch']);
};