@oneflowab/babel-plugin-pomes-extract

Babel plugin to extract strings from React components in which Pomes Translation API has been used and gettext-like functions into a gettext POT file

Usage no npm install needed!

<script type="module">
  import oneflowabBabelPluginPomesExtract from 'https://cdn.skypack.dev/@oneflowab/babel-plugin-pomes-extract';
</script>

README

babel-plugin-pomes-extract

Build Status codecov npm version downloads

Babel plugin to extract strings from React components in which Pomes Translation API has been used and gettext-like functions into a gettext POT file.

Usage

yarn add @oneflowab/babel-plugin-pomes-extract

Then you could configure the babel plugin like below:

module.exports = {
  presets: [
    //...
  ],
  plugins: [
    //...
    ['@oneflowab/babel-plugin-pomes-extract', {
      outputDir: 'translations',
      headers: {
        'po-revision-date': new Date().toISOString(),
      },
    }],
  ],
};