-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
55 lines (50 loc) · 1.07 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
module.exports = function(grunt) {
grunt.initConfig({
copy: {
main: {
src: [
'assets/**',
'includes/**',
'languages/**',
'airstory.php',
'readme.txt',
'uninstall.php',
'composer.json',
'CHANGELOG.md',
'LICENSE.md',
/*
* Exclude files not necessary in the distribution.
*
* @link https://github.com/copyhackers/airstory-wp/issues/69
*/
'!includes/lib/wp-async-task/*.dist',
'!includes/lib/wp-async-task/tests/**',
],
dest: 'dist/'
},
},
makepot: {
target: {
options: {
domainPath: 'languages/',
exclude: [
'dist',
'includes/lib',
'node_modules',
'tests',
'vendor',
],
mainFile: 'airstory.php',
type: 'wp-plugin',
updateTimestamp: false,
updatePoFiles: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-wp-i18n');
grunt.loadNpmTasks('grunt-composer');
grunt.registerTask('build', ['composer:install', 'i18n', 'copy']);
grunt.registerTask('i18n', ['makepot']);
};