-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
33 lines (29 loc) · 999 Bytes
/
gulpfile.js
File metadata and controls
33 lines (29 loc) · 999 Bytes
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
// Require all the things (that we need).
const gulp = require('gulp');
const sort = require('gulp-sort');
const wp_pot = require('gulp-wp-pot');
// Define the source paths for each file type.
const src = {
php: ['**/*.php','!vendor/**','!node_modules/**']
};
// Create the .pot translation file.
gulp.task('translate', function () {
gulp.src('**/*.php')
.pipe(sort())
.pipe(wp_pot( {
domain: 'wpcampus',
destFile:'wpcampus-data-plugin.pot',
package: 'wpcampus-data-plugin',
bugReport: 'https://github.com/wpcampus/wpcampus-plugin/issues',
lastTranslator: 'WPCampus <code@wpcampus.org>',
team: 'WPCampus <code@wpcampus.org>',
headers: false
} ))
.pipe(gulp.dest('languages'));
});
// I've got my eyes on you(r file changes).
gulp.task('watch', function() {
gulp.watch(src.php, ['translate','php']);
});
// Let's get this party started.
gulp.task('default', ['translate']);