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.
ember install ember-cli-intl-shake
The addon options can be configured in ember-cli-build.js
.
Example config:
'ember-cli-intl-shake': {
translationsDir: 'translations',
}
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.
If you want to contribute to this addon, please read the CONTRIBUTING.md.
We use SemVer for versioning. For the versions available, see the tags on this repository.
See the list of contributors who participated in this project.
This project is licensed under the MIT License.