Raffaeu Raffaeu - 1 year ago 175
Node.js Question

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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download