@gulppress/translate
v0.0.1-6
Published
> Generate pot files for WordPress plugins and themes with [`wp-pot`](https://github.com/wp-pot/wp-pot)
Downloads
15
Readme
@gulppress/translate
Generate pot files for WordPress plugins and themes with
wp-pot
@gulppress/translate is part of the gulppress workflow to build assets for WordPress.Check out the gulppress documentation before using to take full advantage of everything it has to offer.
Install
$ npm install --save-dev @gulppress/translate
Usage
Basic
import { task } from 'gulp';
import getTranslationTask from '@gulppress/translate';
task('translate', getTranslationTask({
src: './**/*.php',
dest: './languages/test.pot',
}));
With custom wp-pot options
import { task } from 'gulp';
import getTranslationTask from '@gulppress/translate';
task('translate', getTranslationTask({
src: './**/*.php',
dest: './languages/test.pot',
wpPotOptions: {
domain: 'gulppress',
lastTranslator: 'John Doe <[email protected]>',
package: 'gulppress',
team: 'Team <[email protected]>',
}
}));
API
src
Type: string | string[]
A glob string or an array of glob strings.
Gets be passed to gulp.src()
.
dest
Type: string | string[]
The path of the output directory where files will be written.
Gets passed to gulp.dest()
.
wpPotOptions
Type: object
See available options in the wp-pot readme, https://github.com/wp-pot/wp-pot#options
All options except src
, writeFile
, and destFile
is passed to wp-pot.
Related
License
MIT © Woda