Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Makes `actions` accept a function #1
First of all: thanks a lot for this handy tool. It's easy to setup, configure and use. It's super-flexible compared to the custom Yeoman generator we used before — no need to publish a new version and ensure everyone is up-to-date. That's awesome ;-)
In our main project we quickly ran into a use case: when we create a new module it can have a collection+model or just a model, it may need a single item view or a collection view or a composite view…
The current way to do it would be either:
That would be nice if plop asks us if we want a model or a collection+model right during module creation, and produces everything needed as once.
Hence, I simply made
This was the best solution I found to keep it simple. I've updated the README accordingly to explain this + made a usage example.
Passing by, this PR includes:
Let me know if something is wrong or missing.
Hi, thanks for taking the time to contribute. i'm so glad that others are finding plop to be as useful as I have. I'll review your PR soon and probably pull it in. I think the idea of having actions take an array or function is great! It adds a lot of flexibility without complicating the API.