-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.js
33 lines (27 loc) · 1.25 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
module.exports = function (grunt) {
require('jit-grunt')(grunt, {
'bump-only': 'grunt-bump',
'bump-commit': 'grunt-bump',
changelog: 'grunt-conventional-changelog',
});
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
});
grunt.file.expand('build/*.js').forEach(function (task) {
require('./' + task)(grunt);
});
grunt.registerTask('test-dev', ['webpack:edge', 'karma:testList']);
grunt.registerTask('test', ['webpack:edge', 'karma:testWithCoverage']);
grunt.registerTask('validate', ['eslint', 'test']);
grunt.registerTask('concatCometd', ['uglify:cometdMin', 'uglify:cometdDebug']);
grunt.registerTask('components', ['webpack:assignment', 'webpack:login', 'copy:components']);
grunt.registerTask('production', ['concatCometd', 'validate', 'webpack:mapped', 'webpack:min', 'components']);
grunt.registerTask('release', function (type) {
//TODO: Integrate 'changelog' in here when it's stable
type = type ? type : 'patch';
['bump-only:' + type, 'production', 'bump-commit'].forEach(function (task) {
grunt.task.run(task);
});
});
grunt.registerTask('default', ['concatCometd', 'webpack:edge', 'components', 'watch']);
};