-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.js
55 lines (51 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
const chalk = require( 'chalk' );
const fs = require( 'fs' );
const semver = require( 'semver' );
const _ = require( 'lodash' );
const { join } = require( 'path' );
require('dotenv').config();
module.exports = grunt => {
require('load-grunt-config')(grunt, {
// path to task.js files, defaults to grunt dir
configPath: join(process.cwd(), 'build/grunt/configs'),
// ...
jitGrunt: {
// here you can pass options to jit-grunt (or just jitGrunt: true)
staticMappings: {
// here you can specify static mappings, for example:
},
customTasksDir: './build/grunt/tasks'
}
});
// Default task(s).
grunt.registerTask( 'default', [ 'watch:assets' ] );
grunt.registerTask( 'versionUpgrade', 'Do the process to change version number', [
'bump-version-precheck',
'lint',
'test',
'prompt:upgrade',
'rebuildAssets',
'bump-version-do',
'changed:replace:headers',
'replace:readmeVersion',
'wp_readme_to_markdown',
] );
grunt.registerTask( 'documentate', [
'phpdoc',
] );
grunt.registerTask( 'rebuildAssets', [
'sh:rollup-build',
'htmlmin',
] );
grunt.registerTask( 'lint:fix', [
'tslint:fix',
'phpcbf',
] );
grunt.registerTask( 'lint', [
'tslint:nofix',
'phplint',
] );
grunt.registerTask( 'test', [
'phpunit',
] );
};