forked from emberjs/ember-inspector
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
79 lines (62 loc) · 1.68 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
module.exports = function(grunt) {
function loadFrom(path, config) {
var glob = require('glob'),
object = {};
glob.sync('*', {cwd: path}).forEach(function(option) {
var key = option.replace(/\.js$/,'');
config[key] = require(path + option);
});
}
var config = {
pkg: grunt.file.readJSON('package.json'),
env: process.env,
clean: ['tmp']
};
loadFrom('./tasks/options/', config);
grunt.initConfig(config);
require('matchdep')
.filterDev('grunt-*')
.filter(function(name){ return name !== 'grunt-cli'; })
.forEach(grunt.loadNpmTasks);
grunt.loadTasks('tasks');
grunt.registerTask('build', [
'clean',
'ember_handlebars',
'transpile:main',
'concat:main',
'concat:main_css',
'build_ember_debug',
'jshint:all',
'copy:chrome_extension',
'wrap:chrome_ember_debug',
'copy:firefox_extension',
'wrap:firefox_ember_debug'
]);
grunt.registerTask('build_ember_debug', [
'transpile:ember_debug',
'copy:ember_debug',
'concat:ember_debug'
]);
grunt.registerTask('build_test', [
'build',
'transpile:tests',
'copy:tests',
'concat:ember_extension_tests',
'concat:ember_debug_tests',
'jshint:tests'
]);
grunt.registerTask('build_xpi', [
'mozilla-addon-sdk',
'mozilla-cfx-xpi'
]);
grunt.registerTask('run_xpi', ['build', 'build_xpi', 'mozilla-cfx:run']);
grunt.registerTask('build_and_upload', [
'build',
'compress:main',
'build_xpi',
'ember-s3'
]);
grunt.registerTask('server', ['build_test','connect','watch']);
grunt.registerTask('test', ['build_test', 'connect', 'qunit:all']);
grunt.registerTask('default', ['build']);
};