yo icon indicating copy to clipboard operation
yo copied to clipboard

Easing installation of generators?

Open hemanth opened this issue 10 years ago • 8 comments

As of now:

$ yo xyz
Error xyz 

You don't seem to have a generator with the name xyz installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 25 registered generators run yo with the `--help` option.

Would it be useful if it's something like:

$ yo xyz
Error xyz 

You don't seem to have a generator with the name xyz installed.

Would you like me to install it for you?  

That would check if there exists a generator-xyz and does a npm install generator-xyz

hemanth avatar Mar 08 '14 13:03 hemanth

:+1:

sindresorhus avatar Mar 08 '14 13:03 sindresorhus

Was pawing around the code, looks like we need to improve Environment.prototype.create

hemanth avatar Mar 08 '14 13:03 hemanth

Improving the UX will always get a huge :+1: from me. Keep the suggestions coming :)

sindresorhus avatar Mar 08 '14 13:03 sindresorhus

:+1: from me too

SBoudrias avatar Mar 08 '14 18:03 SBoudrias

Yes! Please. This would be great. If you get a chance to patch prototype.create sufficiently to make this possible I'm pretty sure we'd be happy to land this change.

Btw, I noticed you've been asking about how to pull in all of the generators (for the contributor use-case). What we do over in Polymer is have a polymer-all style repo so that you just git clone it and run a script which will recursively get you all generators and deps then run npm install && bower install on them for you. I wouldn't be opposed to us having something similar. That said, I haven't needed to do this just yet. Most of the time I just use a GUI to clone what I need in one click.

addyosmani avatar Mar 09 '14 11:03 addyosmani

@addyosmani I did this and that for cloning all of the repos.

Currently I'm pawing at prototype.create and would <3 to do something like yeoman-all too! :smile:

Update 0: Is this that polymer-all you are referring to?

hemanth avatar Mar 09 '14 14:03 hemanth

^ Changes yo to handle the installation, was wondering if we also need this change in generator also?

hemanth avatar Mar 11 '14 14:03 hemanth

Fixed by setting NODE_PATH

https://github.com/yeoman/generator-polymer/issues/31

kristianmandrup avatar Nov 26 '14 18:11 kristianmandrup