Open meleklassoued opened 7 months ago
You should be able to use the normal node API to load and parse data out of a JSON file and pass it to actions that you want to execute. Each Action supports a data
prop as part of the API. An object passed to this prop will be merged with user answer data before running the action.
I have this desire too -- to be able to import prompt values from a json file rather than use the command-line. (My workaround is to write a shell script that translates the json file into command-line parameters.)
I'm not really understanding the advice from @amwmedia. I see that each action supports a data
property, but the json file should influence the prompts (not actions).
Description :
I want to generate some files using pre-prepared templates. I'd like to pass a JSON file to the prompt, which will allow for the direct generation of the templates based on its content.