webpack-angular-gettext

0.2.0 • Public • Published

webpack-angular-gettext

Webpack plugin & loader that extract translatable strings from your source files for angular-gettext.

Based on webpack-angular-translate and angular-gettext-extract-loader.

Getting started

Install the plugin using npm:

npm install --save-dev webpack-angular-gettext

Configure the loader and the plugin in the webpack configuration.

var WebpackAngularGettext = require('webpack-angular-gettext');

module.exports = {
  // ...
  module: {
    preLoaders: [
      {
        test: /\.html$/,
        exclude: /node_modules/,
        loader: WebpackAngularGettext.loader()
      },
      {
        test: /\.js$/,
        loader: WebpackAngularGettext.loader()
      }
    ]
  }

  plugins: [
    new WebpackAngularGettext.Plugin()
  ]
};

The Plugin() accepts the following options in the constructor:

  • fileName: The name of the file that contains all the translations, default translations.pot

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-angular-gettext

Weekly Downloads

19

Version

0.2.0

License

MIT

Last publish

Collaborators

  • allenwu
  • timonwong