-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
28 lines (24 loc) · 948 Bytes
/
gulpfile.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
const project = require('./package.json');;
const gulp = require('gulp');
const wpPot = require('gulp-wp-pot');
const clean = require('gulp-clean');
const zip = require('gulp-zip');
gulp.task('pot', function () {
return gulp.src(['**/*.php', '!__*/**', '!src/**', '!assets/**'])
.pipe(wpPot( {
domain: project.name,
bugReport: '[email protected]',
team: 'KowsarHossain <[email protected]>'
} ))
.pipe(gulp.dest('languages/'+project.name+'.pot'));
});
gulp.task('clean', function () {
return gulp.src('__build/*.*', {read: false})
.pipe(clean());
});
gulp.task('zip', function () {
return gulp.src(['**', '!__*/**', '!node_modules/**', '!src/**', '!gulpfile.js', '!readme.md', '!package.json', '!package-lock.json', '!todo.txt'], { base: '..' })
.pipe(zip(project.name+'.zip'))
.pipe(gulp.dest('__build'))
});
gulp.task('build', gulp.series('pot','clean','zip'));