Comments (12)
I like how generate
's generators share an environment when ran. In fact, I initially added the ability to run multiple generators with yo under the same environment from the commandline; however, they didn't like the idea of having them share data on it (for justifiable reasons). I think at the very least it is useful for sub-generators and composing them together. So to me, that is one of the strong points of generate, because in my eyes it allows for more powerful composability (simpler prompting that scaffolds better and more normalized projects)
To give you an example of a place I wanted to use this in, I was going to make this "generator suite" for yeoman that scaffolded out multiple types of projects (called generator-devjs
) using sub-generators that share a global.devjs
object (or this.env.devjs
)... so the main idea was that it only prompted once for certain information then reused it in the other sub-generators. That generator has since been discontinued because I've been content enough with generate's packages, though.
from generate.
Node.js needs a fast, pluggable prompt library that isn't bloated and dog slow. We might have some ideas here :)
Sounds great! keypress
looks good as starting point for this job. I have some very old shit thingy with it https://github.com/tunnckoCore/prompt-promise. Let me know if can help or suggest something more - the word "pluggable" is enough.
Let's do it.
from generate.
K you ready for this? :) I think we can simplify further, but it's just a start.
from generate.
@tunnckoCore can you check gitter? I left a msg
from generate.
awesome! yeah we plan to expand on how generators share data. This is also a favorite feature of mine because of how intuitive it is (to reiterate for anyone who might be joining the convo, every generator is created with a new instance of generate, but we also expose a special "shared" instance that can be used to pass specific data or options back between generators).
from generate.
progress here: https://github.com/enquirer
from generate.
awesome! i'll look.
from generate.
Yea, no problem. I'm on slack rooms of toolkit too. :)
from generate.
I didn't know toolkit had one lol. I do now!
from generate.
I just commented there
from generate.
I didn't know toolkit had one lol. I do now!
Yea, I don't see you there https://[generatejs/basejs/verbjs/etc].slack.com/messages/general :)
from generate.
you don't? I should be. I thought you meant an actual toolkit
room.
from generate.
Related Issues (20)
- Finally, how can customize the templates? HOT 9
- feature: help
- Running generate locally HOT 8
- Range Error HOT 1
- generate-example not working as intended HOT 1
- prompts / data HOT 3
- feature: autocompletion for the tasks HOT 3
- bug: the reverse of inverse flags should be set on options HOT 4
- Using generate inside of modules? HOT 7
- Broken links in github page HOT 3
- Error: no writecb in Transform class HOT 5
- proposed refactor of data handling HOT 2
- fails when git repository does not exist HOT 3
- What's the state of custom templates? HOT 2
- How to run a global generator from a generator repository ? HOT 9
- Why and when `app.base.cache.data.name` is overriden by generate ? HOT 3
- Can't run the generator that's installed globally HOT 23
- Use generate as API? HOT 2
- Can't use global generator, which has been installed using `pnpm` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generate.