ember-cli-intl-shake
v2.4.0
Published
Shake intl files using app literals
Downloads
9
Readme
ember-cli-intl-shake
Information
Tree-shakes internationalization files reading literals from app and engine files.
I18n from engines are splitted in its own files.
If you are using ember-intl
addon, remember to enable publicOnly
option to be able to output i18n files to a folder.
Installation
ember install ember-cli-intl-shake
Usage
The addon options can be configured in ember-cli-build.js
.
Example config:
'ember-cli-intl-shake': {
translationsDir: 'translations',
}
Options
translationsDir
type: String
default: translations
Output directory where to find current i18n files.
addons.include
type: Array
default: undefined
Addons to include in the literal shake (String
or RegExp
).
addons.exclude
type: Array
default: undefined
Addons to exclude from the literal shake (String
or RegExp
).
files.include
type: Array
default: undefined
Files to include in the literal shake.
files.exclude
type: Array
default: undefined
Files to exclude from the literal shake.
directories.include
type: Array
default: undefined
Directories to include in the literal shake to the app module.
filters
type: Array
default:
[{
extensions: ['js'],
filter: require('./lib/filters/javascript')
}, {
extensions: ['hbs'],
filter: require('./lib/filters/handlebars')
}, {
extensions: ['json'],
filter: require('./lib/filters/json')
}]
Filters and extensions to filter literals to shake translation files.
Contribute
If you want to contribute to this addon, please read the CONTRIBUTING.md.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
See the list of contributors who participated in this project.
License
This project is licensed under the MIT License.