1 min readJan 17, 2017
Thanks Bogac!
Is this solution working for Windows? It is much more verbose but does not need an external file ans should run on all platform (if && is supported on windows CMD, elsewhere you could simply replace && by ; in the latest line)
"scripts": {
"build-i18n:fr": "ng build -o dist/fr --aot -prod --bh /fr/ --i18n-file=src/i18n/messages.fr.xlf --i18n-format=xlf --locale=fr",
"build-i18n:es": "ng build -o dist/es --aot -prod --bh /es/ --i18n-file=src/i18n/messages.es.xlf --i18n-format=xlf --locale=es",
"build-i18n:en": "ng build -o dist/en --aot -prod --bh /en/ --i18n-file=src/i18n/messages.en.xlf --i18n-format=xlf --locale=en",
"build-i18n": "npm run build-i18n:en && npm run build-i18n:es && npm run build-i18n:fr"
}