Home

Awesome

wp-pot

Information

GitHub Workflow Status npm version Average time to resolve an issue Percentage of issues still open

Packagewp-pot
DescriptionGenerate pot files for WordPress plugins and themes.

Like my work and want to say thanks?

Do it here:
Buy Me A Coffee

Install

npm install --save-dev wp-pot

Example usage

PHP File Parsing

const wpPot = require('wp-pot');

wpPot({
  destFile: 'file.pot',
  domain: 'domain',
  package: 'Example project',
  src: 'src/*.php'
});

JS File Parsing (only js, no jsx for now)

wpPot({
  parser: 'js',
  parserOptions: {
    ecmaVersion: 6,
  },
  src: 'test/fixtures/edge-cases.js'
});

Options

All options is optional

Related

License

MIT © Rasmus Bengtsson