0.0.1-6 • Published 2 years ago

@gulppress/translate v0.0.1-6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@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 <me@example.com>',
        package: 'gulppress',
        team: 'Team <team@example.com>',
    }
}));

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

0.0.1-6

2 years ago

0.0.1-4

2 years ago

0.0.1-3

2 years ago

0.0.1-2

2 years ago

0.0.1-1

2 years ago