Say I have three custom Ember addons...
addon-a
addon-b
addon-c
I want each addon to contain its own vendor/translations/ folder containing different JSON files for each locale.
addon-a
vendor
translations
en.json
es.json
...
addon-b
vendor
translations
en.json
es.json
...
addon-c
vendor
translations
en.json
es.json
...
I want to include these three addons in my main Ember.js application (my-app). During the build process I want to create one JSON file per locale, containing the contents of all three addons.
// my-app's final en.json file.
{
"addon-a": {
// addon-a en.json contents output here.
},
"addon-b": {
// addon-b en.json contents output here.
},
"addon-c": {
// addon-c en.json contents output here.
}
}
I am using app.import('vendor/translations/en.json') to include the addon's JSON files into my-app's build output. However, I am stuck on trying to create the single JSON files for each locale. I then want to remove the addon's JSON files that were imported to create the concatenated files.
Is what I am trying to do possible? If so, can anyone provide steps on how to achieve this or point me to an example of something similar? Thanks!