Skip to content

Commit

Permalink
Add explicit version to download links (vuejs#1398)
Browse files Browse the repository at this point in the history
* Add explicit version to download links

* improve CDN section of installation page
  • Loading branch information
rubydesign authored and chrisvfritz committed Jan 22, 2018
1 parent 23f59fe commit c4b7f9a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions pre-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Promise.all([
installation
.replace(/vue_version: .*/, 'vue_version: ' + version)
.replace(/gz_size:.*/g, `gz_size: "${prodSize}"`)
.replace(/\/vue@[\d\.]+\//g, `/vue@${version}/`)
)
console.log(`\nSuccessfully updated Vue version and gzip file size.\n`)
}).catch(err => {
Expand Down
13 changes: 11 additions & 2 deletions src/v2/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,18 @@ Simply download and include with a script tag. `Vue` will be registered as a glo

### CDN

Recommended: [https://cdn.jsdelivr.net/npm/vue](https://cdn.jsdelivr.net/npm/vue), which will reflect the latest version as soon as it is published to npm. You can also browse the source of the npm package at [https://cdn.jsdelivr.net/npm/vue/](https://cdn.jsdelivr.net/npm/vue/).
We recommend linking to a specific version number that you can update manually:

Also available on [unpkg](https://unpkg.com/vue) and [cdnjs](https://cdnjs.cloudflare.com/ajax/libs/vue/{{vue_version}}/vue.js) (cdnjs takes some time to sync so the latest release may not be available yet).
``` html
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
```

You can browse the source of the NPM package at [cdn.jsdelivr.net/npm/vue](https://cdn.jsdelivr.net/npm/vue/).

Vue is also available on [unpkg](https://unpkg.com/vue@{{vue_version}}/dist/vue.js) and [cdnjs](https://cdnjs.cloudflare.com/ajax/libs/vue/{{vue_version}}/vue.js) (cdnjs takes some time to sync so the latest release may not be available yet).

Make sure to read about [the different builds of Vue](#Explanation-of-Different-Builds) and use the **production
version** in your published site, replacing `vue.js` with `vue.min.js`. This is a smaller build optimized for speed instead of development experience.

## NPM

Expand Down

0 comments on commit c4b7f9a

Please sign in to comment.