包详细信息

@intellihr/rosaenlg-loader

intellihr179ISC0.0.3

Webpack Loader for RosaeNLG

webpack, RosaeNLG, NLG, loader

自述文件

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

更新日志

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.0.2 (2021-06-30)

0.0.1 (2021-06-29)

0.0.2 (2021-06-29)

0.1.1 (2021-06-29)

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.