Raffaeu
Raffaeu

Reputation: 6973

Polymer and npm, update to latest version

I think this is more an npm than a Polymer question. I have a quite large Polymer project, which is now up to version 1.3.0 according to bower.json inside the Polymer folder.

I have been "offline" from this project for about 2 months and now I realized that the Polymer framework is 1.6.0

How can I update to Polymer 1.6.0 using npm? How can I update all existing components already installed in my project?

Upvotes: 2

Views: 507

Answers (1)

Aurora0001
Aurora0001

Reputation: 13547

All you need to do is update your package.json to contain the latest Polymer version, like so:

"dependencies": {
    "polymer": "~1.6.0"
}

Then, run npm update --save (see the documentation here) which will find the latest version compatible with ~1.6.0 (e.g. 1.6.1) and save it in your dependencies.

If you're not sure what the latest version is, you can "cheat" and set the dependency to "*" in your package.json, then run npm update --save. This will automatically find the latest version and save it in your package.json.

You might also find npm outdated useful - it will identify outdated dependencies in your package.json for you to upgrade.

Upvotes: 4

Related Questions