Skip to content

Add explicit version to download links #1398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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