Skip to content
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

formatjs/cli unknown option --messages-dir #1899

Closed
Floriferous opened this issue Jul 30, 2020 · 2 comments
Closed

formatjs/cli unknown option --messages-dir #1899

Floriferous opened this issue Jul 30, 2020 · 2 comments
Labels

Comments

@Floriferous
Copy link

When using @formatjs/cli, the --out-file help description mentions This flag will ignore --messages-dir. But this flag is not documented as an available flag, and the CLI fails when you try to use it.

Is it normal that the functionality of @formatjs/cli and babel-plugin-react-intl have different functionality? The CLI appears to only be able to output a single large .json file, while the babel plugin can only output a hierarchy of files similar to your component hierarchy.

Are they meant to co-exist, or is the CLI package replacing the babel plugin?

@longlho
Copy link
Member

longlho commented Jul 30, 2020

They're meant to co-exist. babel-plugin-react-intl automatically inserts IDs in the transpiled code and @formatjs/cli only extracts. I'll update the help messages accordingly.

@wkerswell-gresham
Copy link

Hey, Seems the --messages-dir has been removed from the babel-plugin-react-intl is there any way to replicate the plugins behaviour of outputting a hierarchy of files similar to your component hierarchy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants