-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running command as a npm script fails #76
Comments
I have no idea how it happened. Could you provide your project so I can reproduce? |
Sorry for the late response but at least I'm coming back with a solution...the problem were the single quotes. If you run the command like Sorry for the false alarm 😊 |
I think you already find a solution. I am not familiar with Windows' command. Maybe the document can be improved more Windows-friendly. Close it for now. Any further PRs are always welcome. 👌🏻 |
Got the same problem on Windows 8.1. $ npm -v
5.6.0
$ node -v
v8.11.1 Script doesn't work from {
"scripts": {
"json2pot": "rip json2pot './build/messages/**/*.json' -o ./src/locales/translations.pot",
"po2json": "rip po2json './src/locales/he.po' -m './build/messages/**/*.json' -o ./src/locales/translations.json"
}
} So npm run json2pot
npm run po2json produces empty files. $ node_modules/.bin/react-intl-po json2pot './build/messages/**/*.json' -o ./src/locales/translations.pot
$ node_modules/.bin/react-intl-po po2json './src/locales/he.po' -m './build/messages/**/*.json' -o ./src/locales/translations.json works perfect. |
Same problem in macos, the pot file is generated empty. Regardless of run via yarn script or directly. |
So I bumped into the following issue: running
rip json2pot 'i18n/messages/**/*.json' -o ./i18n/template.pot
in the console works properly, whilst putting the command in package.json as a script and running it likenpm run i18n-extract
, generates an empty .pot file.Thanks!
The text was updated successfully, but these errors were encountered: