forked from denisnazarov/torii
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
75 lines (60 loc) · 1.71 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
module.exports = function(grunt) {
var path = require('path');
require('load-grunt-tasks')(grunt);
var config = require('load-grunt-config')(grunt, {
configPath: path.join(process.cwd(), 'tasks/options'),
init: false
});
grunt.loadTasks('tasks');
this.registerTask('default', ['build']);
// Run a server. This is ideal for running the QUnit tests in the browser.
this.registerTask('server', [
'build',
'tests',
'connect',
'watch:server'
]);
// Build test files
this.registerTask('tests', 'Builds the test package', [
'transpile:testsAmd',
'concat:amdTests' // yet another hack to get es6 transpiled tests
]);
// Build a new version of the library
this.registerTask('build', 'Builds a distributable version of <%= cfg.name %>', [
'clean:build',
'transpile:amd',
'concat:forTests',
'jshint:lib'
]);
// Custom phantomjs test task
this.registerTask('test:phantom', "Runs tests through the command line using PhantomJS", [
'build',
'tests'
]);
this.registerTask('test', [
'build',
'tests',
'testem:ci:basic'
]);
this.registerTask('build-release', [
'clean:release',
'build',
'concat:amd',
'concat:amdNoVersion',
'concat:browser',
'es3_safe_recast:all',
'uglify:noVersion',
'uglify:withVersion',
'usebanner:addVersion',
'copy:appAddOn',
'copy:vendorAddOn'
]);
// Custom YUIDoc task
this.registerTask('docs', ['yuidoc']);
config.env = process.env;
config.pkg = grunt.file.readJSON('package.json');
// Load custom tasks from NPM
grunt.loadNpmTasks('grunt-contrib-yuidoc');
// Merge config into emberConfig, overwriting existing settings
grunt.initConfig(config);
};