@intellihr/rosaenlg-loader

0.0.3 • Public • Published

npm

rosaenlg-loader

Webpack loader for RosaeNLG (https://rosaenlg.org/)

Getting Started

To begin, you'll need to install rosaenlg-loader:

$ npm install rosaenlg-loader --save-dev

Then add the loader to your webpack config. For example:

file.pug

import file from 'file.pug';

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.pug$/,
        use: [
          {
            loader: `rosaenlg-loader`,
            options: {
              language: ['en_US']
            },
          },
        ],
      },
    ],
  },
};

And run webpack via your preferred method.

Options

language

Type: string|array

Target languages for compilation, e.g. en_US, fr_FR

Examples

[ example outline text ]

webpack.config.js

{
  test: /\.pug$/,
  use: [
    {
      loader: `rosaenlg-loader`,
      options: {
        language: ['en_US']
      },
    },
  ],
}

file.pug

| example translation

file.js

import rosaenlg from 'rosaenlg/dist/rollup/rosaenlg_tiny_en_US_3.0.0';
import template from 'file.pug';

const text = template.en_US({
  util: new rosaenlg.NlgLib({ language: 'en_US' })
})

Contributing

Please take a moment to read our contributing guidelines if you haven't yet done so.

CONTRIBUTING

License

MIT

Package Sidebar

Install

npm i @intellihr/rosaenlg-loader

Weekly Downloads

78

Version

0.0.3

License

ISC

Unpacked Size

7.2 kB

Total Files

6

Last publish

Collaborators

  • intellihrci
  • callum-p
  • soloman1124