Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the preferred way of updating Yeoman generators?

Tags:

yeoman

I've created a Yeoman generator and want my team to use it.

What happens if I update my generator on Github? They installed the generator locally in an older version. Do they always have to install again to get the latest version?

Team members don't know when updates happen and I don't want them to care too much about it. I just would like for them to use the latest version of the generator.

What is the suggested way of updating generators?

Thanks

like image 203
Markus Avatar asked Jul 01 '13 09:07

Markus


2 Answers

Glad you asked!

Starting with Yeoman RC1, which will be announced later today, there's a brand new way to manage your generators: Just enter yo and enjoy the new wizard:

enter image description here

If you select "Update Generators" from the menu, yo yo will take care of bringing them all to the latest version.

If you are a generator author and want to go one step further to make sure your users are always up-to-date, you can use update-notifier from the Yeoman project to greet users with a notification if they run an obsolete version.

like image 74
passy Avatar answered Sep 19 '22 16:09

passy


If you want to update a specific generator you can run npm update generator-mygenerator -g

Nice if you have many generators installed.

like image 45
Johan B Avatar answered Sep 22 '22 16:09

Johan B