What is the preferred way of updating Yeoman generators?
Asked Answered
M

3

75

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

Murtagh answered 1/7, 2013 at 9:15 Comment(0)
R
119

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.

Ra answered 1/7, 2013 at 10:23 Comment(6)
sorry but how do I get there? I installed 1.0 rc1 but can't find the menu from your screenshot.Murtagh
I am having the same issue. I'm running yo but I don't receive this list of items.Evangelia
passy, how do you get that sweet Yeoman graphic? I'm getting a plaintext UI.Freeswimming
@DeanMoses It was causing more trouble than the cuteness could justify. :(Ra
How do you update sites generated by the generator after you've updated the generator? Is this even possible?Protectorate
@Protectorate This question helped me #18480816Montes
V
16

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

Nice if you have many generators installed.

Violation answered 4/2, 2014 at 15:33 Comment(0)
G
0

In linux I had trouble of upgrading using the yoeman cli because of some permission issues

So instead I did the following

In my case it was

sudo npm install -g generator-your-generator-name

This automatically reinstalled the latests version

You could try

npm install -g generator-your-generator-name
Giovanna answered 18/8, 2020 at 14:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.