-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
39 lines (36 loc) · 885 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
29
30
31
32
33
34
35
36
37
38
39
const gulp = require( 'gulp' ),
zip = require( 'gulp-zip' ),
wpPot = require( 'gulp-wp-pot' ),
sort = require( 'gulp-sort' );
gulp.task( 'bundle', () => {
return gulp
.src( [
'**/*',
'!node_modules/**',
'!bundled/**',
'!eslintrc.js',
'!gulpfile.js',
'!package.json',
'!package-lock.json',
'!webpack.config.js',
'!.gitignore',
] )
.pipe( zip( 'stylizedx.zip' ) )
.pipe( gulp.dest( 'bundled' ) );
} );
gulp.task( 'translate', () => {
return gulp
.src( './**/*.php' )
.pipe( sort() )
.pipe(
wpPot( {
domain: 'stylizedx',
package: 'stylizedx',
bugReport: 'https://deothemes/contact/',
lastTranslator: 'Alexander Samokhin <[email protected]>',
team: 'DeoThemes <[email protected]>',
} )
)
.pipe( gulp.dest( './languages/stylizedx.pot' ) );
} );
gulp.task( 'default', gulp.series( 'translate', 'bundle' ) );