The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
What is the purpose of the no-prompt option in frontity create-package command
It asks you the same questions with or without this option
⬢ cool-project npx frontity create-package my-custom-theme --no-prompt
? Enter the namespace of the package: theme
✔ Adding package.json.
✔ Adding src/index.js.
✔ Installing package my-custom-theme.
New package "my-custom-theme" created.
⬢ cool-project npx frontity create-package my-custom-theme2
? Enter the namespace of the package: theme
✔ Adding package.json.
✔ Adding src/index.js.
✔ Installing package my-custom-theme2.
New package "my-custom-theme2" created.
mmczaplinski2
This flag is intended for programmatic use of the CLI.
You can also pass the name of the package as an environmental variable FRONTITY_NAME . In this case, if you pass the --no-prompt flag, the CLI will use the name from that variable.
If you don’t specify FRONTITY_NAME, the CLI will have to prompt you for the name of the package because otherwise how is it going to know what you want to call it?
But I agree that it should be documented much better because it’s confusing - I would also think that it’s a bug!
luisherranz3
Yeah, --no-prompt should never prompt, and it should use the default options if the args or ENV variables are not present. In this case, it should use the namespace theme. So I agree with @mmczaplinski, this is a bug.
@juanma Sorry if my initial reply was confusing to you. I think I misunderstod that you were already passing the name of the package to the CLI. It’s indeed a bug!