-
Notifications
You must be signed in to change notification settings - Fork 56
allow to execute subactions #58
base: master
Are you sure you want to change the base?
Conversation
I love this feature! The only thing that is bugging me is that it makes the plopfileApi different in different contexts. Not sure that there's a way around this that doesn't give up functionality. I was thinking of just letting the action return an array of more actions to run, but then you can run code AFTER the sub-actions run. Any thoughts? |
I think its worth it. Its not the most beautiful api, but it works and solve some issues |
I'm going to spend a little time with this... I think it needs to get merged in one form or another. 👍 |
i merged master back in. Hope you can take a look soon! |
any chance to get this merged? its tested and solves some issues |
yeah, I will try to get it in soon. I was reviewing the code and trying to work out a solution that doesn't create a variant API inside the action. Then life got crazy :-). I'm going to revisit it this week. |
@amwmedia any updates ;-) i know, its not the best to reinvent a new api, but its a pragmatic approach |
agreed, I'm trying to see if there's a way to get the full |
We're moving the This repo will be archived in a short bit. https://github.com/plopjs/plop/tree/master/packages/node-plop |
In
plop.setActionType
the third parameter ("plopfileApi") has now a new function as propertyrunActions(actions, data)
You can pass an array of
actions
, so that your custom action type will invoke all these actions as part of your custom action (like "child" actions)See the tests or linked issue for an example.
solves plopjs/plop#103
error logging is a bit hacky, but show all infos from the sub actions as well.