-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
executable file
·42 lines (33 loc) · 1.33 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
function config(name) {
return require('./tasks/options/' + name);
}
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('bower.json'),
neuter: config('neuter'),
jshint: config('jshint'),
uglify: config('uglify'),
release: config('release'),
qunit: config('qunit'),
build_test_runner_file: {
all: ['packages/ember-auto/tests/**/*_test.js']
},
banner: config('banner'),
strip: config('strip'),
clean: config('clean'),
copy: config('copy'),
connect: config('connect'),
watch: config('watch')
});
// Load the node modules that provide tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// rename relase so we can apply our own behavior, then call the npm grunt-release
grunt.task.renameTask('release', 'publish');
// load local tasks
grunt.task.loadTasks('./tasks');
grunt.registerTask('develop', ['jshint:development', 'neuter', 'build_test_runner_file', 'connect:test', 'watch']);
grunt.registerTask('build', ['jshint:all', 'neuter', 'production']);
grunt.registerTask('production', ['copy:production', 'strip:production', 'uglify:production', 'banner']);
grunt.registerTask('test', ['jshint:all', 'neuter', 'build_test_runner_file', 'qunit:cli', 'clean:test']);
grunt.registerTask('default', ['build']);
};