From 63e25b05d6159df7f9c43b40a74f9b2b72504821 Mon Sep 17 00:00:00 2001 From: neverland Date: Mon, 20 Dec 2021 14:51:51 +0800 Subject: [PATCH] docs: add free CDN tips (#10068) --- docs/markdown/quickstart.en-US.md | 9 +++++++++ docs/markdown/quickstart.zh-CN.md | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/docs/markdown/quickstart.en-US.md b/docs/markdown/quickstart.en-US.md index c03ddceb5..1ccdcf250 100644 --- a/docs/markdown/quickstart.en-US.md +++ b/docs/markdown/quickstart.en-US.md @@ -42,12 +42,21 @@ The easiest way to use Vant is to include a CDN link in the html file, after whi ``` +#### Free CDN + You can use Vant through these free CDN services: - [jsdelivr](https://www.jsdelivr.com/package/npm/vant) - [cdnjs](https://cdnjs.com/libraries/vant) - [unpkg](https://unpkg.com/) +Note: Free CDN is generally used for making prototypes or personal projects. It is not recommended to use free CDN in production environment. + +For enterprise developers, we recommend: + +- install with npm, use build tools to bundle it +- download the scripts, host it on your own server + ### CLI We recommend to use [Vue Cli](https://cli.vuejs.org/) to create a new project. diff --git a/docs/markdown/quickstart.zh-CN.md b/docs/markdown/quickstart.zh-CN.md index 802b3faf8..e0ab2d9ff 100644 --- a/docs/markdown/quickstart.zh-CN.md +++ b/docs/markdown/quickstart.zh-CN.md @@ -49,12 +49,21 @@ npm i vant@next -S ``` +#### 免费 CDN + 你可以通过以下免费 CDN 服务来使用 Vant: - [jsdelivr](https://www.jsdelivr.com/package/npm/vant) - [cdnjs](https://cdnjs.com/libraries/vant) - [unpkg](https://unpkg.com/) +注意:免费 CDN 一般用于制作原型或个人小型项目,不推荐在企业生产环境中使用免费 CDN。 + +对于企业开发者,建议使用以下方式: + +- 通过 npm 引入,并通过构建工具进行打包 +- 下载对应文件,并托管在你自己的服务器或 CDN 上 + ### 通过脚手架安装 在新项目中使用 Vant 时,推荐使用 Vue 官方提供的脚手架 [Vue Cli](https://cli.vuejs.org/zh/) 创建项目并安装 Vant。