`lingui extract` command prints possibly misleading messages
See original GitHub issueIs your feature request related to a problem? Please describe. Not really a problem, more like a UX issue.
After lingui extract
command finishes there is a message which is likely to be irrelevant due to user’s different script configuration. The message is:
(use "npm run extract" to update catalogs with new messages)
(use "npm run compile" to compile catalogs for production)
Describe proposed solution Print a message without assuming that there are user-defined npm scripts at all:
(run "lingui extract" command to update catalogs with new messages)
(run "lingui compile" command to compile catalogs for production)
# OR
(use "npx lingui extract" to update catalogs with new messages)
(use "npx lingui compile" to compile catalogs for production)
And, if Yarn is used then it should be use "yarn lingui ...
appropriately. This is being detected already.
Describe alternatives you’ve considered Not printing this block at all
Additional context I have a project with junior developers and such messages can be misleading to them. Now I have to document this so they know that in our setup these two operations use different script names.
Here is my scripts section
"scripts": {
"locales:extract": "lingui extract",
"locales:build": "lingui compile",
"locales:dev": "onchange \"src/**/*.{ts,tsx}\" -- npm run locales:extract"
}
Update: proposed a solution with npx
, added my scripts configuration which leads to irrelevant suggestions message
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Yeah, exactly. Looking at your
scripts
there’s no way to make it work for everyone. Let’s keep it open for a while and think it through. Changing help texts isn’t a breaking change so we can do it anytime.That sounds awesome 👍