webpack-stonejs
v1.0.1
Published
Stone.js Webpack plugin to extract / compile translatable strings
Downloads
4
Readme
StoneJS Webpack Plugin
This plugin uses stonejs-tools to extract po.
Requirements
This module requires a minimum of Node v6.9.0 and Webpack v4.0.0.
Getting Started
To begin, you'll need to install webpack-stonejs
:
$ npm install webpack-stonejs --save-dev
Then add the plugin to your webpack
config. For example:
webpack.config.js
const WebpackStonejs = require('webpack-stonejs');
module.exports = {
plugins: [
new WebpackStonejs(),
],
};
And run webpack
via your preferred method.
Options
options.quiet
Type: Boolean
Default value:
false`
Do not output the stonejs-tools log.
options.functions
Type: Array
Default value: ['_', 'gettext', 'lazyGettext']
List of the translation functions
options.merge
Type: boolean
Default value: false
Merge all locales into a single file.
options.format
Type: String
Values: json
or js
Default value: 'json'
Output format for the built catalog.
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.
Release History
- 1.0.0: First release