lore-extract-action
Extracts the action blueprint for a model to src/actions
Extracts the action blueprint for a model to src/actions
CLI command to extract one or more of the actions generated by the framework into your project. This will allow you to see the code that gets executed, and change it if needed.
To use this command, you need to specify the name of the model you'd like to extract an action for, as well as the name of the action you'd like to extract.
lore extract action [model]/[action]
For example, to extract the create
action for the post
model, you would run the command lore extract action post/create
.
If you do NOT specify an action, the command will extract ALL actions for that model. For example, this command:
lore extract action post
Will extract all actions for the post
model, and create the files below:
-src
|-actions
|-post
|-create.js
|-destroy.js
|-find.js
|-get.js
|-update.js