-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
38 lines (30 loc) · 1.26 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
module.exports = function (grunt) {
'use strict';
var r = require;
// require('time-grunt')(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'),
cdnBasePath: '//forio.com/tools/js-libs/flow/'
});
grunt.file.expand('build/*.js').forEach(function (task) {
require('./' + task)(grunt);
});
grunt.registerTask('addons', ['webpack:addons', 'sass:addons']);
grunt.registerTask('addonsDev', ['watch:scriptsAddons', 'watch:stylesAddons']);
grunt.registerTask('test', ['karma:testWithCoverage']);
grunt.registerTask('documentation', ['eslint', 'markdox']);
grunt.registerTask('validate', ['eslint', 'test']);
grunt.registerTask('production', ['validate', 'addons', 'webpack:mapped', 'webpack:min']);
grunt.registerTask('release', function (type) {
type = type ? type : 'patch';
['bump-only:' + type, 'production', 'incrementVersion', 'changelog', 'bump-commit'].forEach(function (task) {
grunt.task.run(task);
});
});
grunt.registerTask('default', ['webpack:edge', 'watch']);
};