Code Monkey home page Code Monkey logo

Comments (12)

jamen avatar jamen commented on May 20, 2024 1

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.

tunnckoCore avatar tunnckoCore commented on May 20, 2024 1

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.

jonschlinkert avatar jonschlinkert commented on May 20, 2024 1

K you ready for this? :) I think we can simplify further, but it's just a start.

from generate.

jonschlinkert avatar jonschlinkert commented on May 20, 2024 1

@tunnckoCore can you check gitter? I left a msg

from generate.

jonschlinkert avatar jonschlinkert commented on May 20, 2024

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.

jonschlinkert avatar jonschlinkert commented on May 20, 2024

progress here: https://github.com/enquirer

from generate.

tunnckoCore avatar tunnckoCore commented on May 20, 2024

awesome! i'll look.

from generate.

tunnckoCore avatar tunnckoCore commented on May 20, 2024

Yea, no problem. I'm on slack rooms of toolkit too. :)

from generate.

jonschlinkert avatar jonschlinkert commented on May 20, 2024

I didn't know toolkit had one lol. I do now!

from generate.

jonschlinkert avatar jonschlinkert commented on May 20, 2024

I just commented there

from generate.

tunnckoCore avatar tunnckoCore commented on May 20, 2024

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.

jonschlinkert avatar jonschlinkert commented on May 20, 2024

you don't? I should be. I thought you meant an actual toolkit room.

from generate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.