mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-27 23:41:22 -05:00
chore: Merge branch 'dev' into next
This commit is contained in:
@@ -1,4 +1,41 @@
|
||||
|
||||
## 4.5.5 (2020-09-10)
|
||||
|
||||
#### :bug: Bug Fix
|
||||
* `@vue/cli-service`
|
||||
* [#5868](https://github.com/vuejs/vue-cli/pull/5868) fix: enable some syntax extensions by default for vue script compiler ([@sodatea](https://github.com/sodatea))
|
||||
* `@vue/cli-plugin-router`, `@vue/cli-service`
|
||||
* [#5852](https://github.com/vuejs/vue-cli/pull/5852) fix: fix duplicate id="app" in Vue 3 project template ([@sodatea](https://github.com/sodatea))
|
||||
* `@vue/cli-plugin-unit-jest`, `@vue/cli-plugin-unit-mocha`
|
||||
* [#5591](https://github.com/vuejs/vue-cli/pull/5591) fix(unit-jest, unit-mocha): generate passing tests when `bare` option is used with router enabled (#3544) ([@IwalkAlone](https://github.com/IwalkAlone))
|
||||
* `@vue/cli-plugin-pwa`
|
||||
* [#5820](https://github.com/vuejs/vue-cli/pull/5820) fix: allow turning off theme color tags ([@GabrielGMartinsBr](https://github.com/GabrielGMartinsBr))
|
||||
* `@vue/cli`
|
||||
* [#5827](https://github.com/vuejs/vue-cli/pull/5827) fix: fix support for Node.js v8 and deprecate it ([@sodatea](https://github.com/sodatea))
|
||||
* [#5823](https://github.com/vuejs/vue-cli/pull/5823) Handle GPG sign git config for initial commit ([@spenserblack](https://github.com/spenserblack))
|
||||
* [#5808](https://github.com/vuejs/vue-cli/pull/5808) fix: strip non-ansi characters from registry config ([@sodatea](https://github.com/sodatea))
|
||||
* [#5801](https://github.com/vuejs/vue-cli/pull/5801) fix: do not throw when api.render is called from an anonymous function ([@sodatea](https://github.com/sodatea))
|
||||
|
||||
#### :house: Internal
|
||||
* `@vue/cli-ui`
|
||||
* [#3687](https://github.com/vuejs/vue-cli/pull/3687) perf(ui): improve get folder list to use Promises instead of sync ([@pikax](https://github.com/pikax))
|
||||
|
||||
#### :hammer: Underlying Tools
|
||||
* `@vue/babel-preset-app`
|
||||
* [#5831](https://github.com/vuejs/vue-cli/pull/5831) chore: rename jsx package scope from ant-design-vue to vue ([@Amour1688](https://github.com/Amour1688))
|
||||
|
||||
#### Committers: 8
|
||||
- Booker Zhao ([@binggg](https://github.com/binggg))
|
||||
- Carlos Rodrigues ([@pikax](https://github.com/pikax))
|
||||
- Haoqun Jiang ([@sodatea](https://github.com/sodatea))
|
||||
- Renan Cidale Assumpcao ([@rcidaleassumpo](https://github.com/rcidaleassumpo))
|
||||
- Sergey Skrynnikov ([@IwalkAlone](https://github.com/IwalkAlone))
|
||||
- Spenser Black ([@spenserblack](https://github.com/spenserblack))
|
||||
- [@GabrielGMartinsBr](https://github.com/GabrielGMartinsBr)
|
||||
- 天泽 ([@Amour1688](https://github.com/Amour1688))
|
||||
|
||||
|
||||
|
||||
## 4.5.4 (2020-08-18)
|
||||
|
||||
#### :bug: Bug Fix
|
||||
|
||||
@@ -289,7 +289,7 @@ module.exports.hooks = (api) => {
|
||||
const renderIndex = lines.findIndex(line => line.match(/render/))
|
||||
lines[renderIndex] += `${EOL} router,`
|
||||
|
||||
fs.writeFileSync(api.entryFile, lines.join(EOL), { encoding: 'utf-8' })
|
||||
fs.writeFileSync(api.resolve(api.entryFile), lines.join(EOL), { encoding: 'utf-8' })
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
+14
-12
@@ -44,6 +44,8 @@ If you are using the PWA plugin, your app must be served over HTTPS so that [Ser
|
||||
If you are deploying to `https://<USERNAME>.github.io/<REPO>/`, (i.e. your repository is at `https://github.com/<USERNAME>/<REPO>`), set `publicPath` to `"/<REPO>/"`. For example, if your repo name is "my-project", your `vue.config.js` should look like this:
|
||||
|
||||
``` js
|
||||
// vue.config.js file to be place in the root of your repository
|
||||
|
||||
module.exports = {
|
||||
publicPath: process.env.NODE_ENV === 'production'
|
||||
? '/my-project/'
|
||||
@@ -265,20 +267,20 @@ You can now access your project on `https://<YOUR-PROJECT-ID>.firebaseapp.com` o
|
||||
|
||||
Please refer to the [Firebase Documentation](https://firebase.google.com/docs/hosting/deploying) for more details.
|
||||
|
||||
### Now
|
||||
### Vercel
|
||||
|
||||
This example uses the latest Now platform version 2.
|
||||
This example uses the latest Vercel platform version 2.
|
||||
|
||||
1. Install the Now CLI:
|
||||
1. Install the Vercel CLI:
|
||||
|
||||
```bash
|
||||
npm install -g now
|
||||
npm install -g vercel
|
||||
|
||||
# Or, if you prefer a local one
|
||||
npm install now
|
||||
npm install vercel
|
||||
```
|
||||
|
||||
2. Add a `now.json` file to your project root:
|
||||
2. Add a `vercel.json` file to your project root:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -287,7 +289,7 @@ npm install now
|
||||
"builds": [
|
||||
{
|
||||
"src": "package.json",
|
||||
"use": "@now/static-build"
|
||||
"use": "@vercel/static-build"
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
@@ -320,11 +322,11 @@ npm install now
|
||||
```diff
|
||||
- {
|
||||
- "src": "package.json",
|
||||
- "use": "@now/static-build"
|
||||
- "use": "@vercel/static-build"
|
||||
- }
|
||||
+ {
|
||||
+ "src": "package.json",
|
||||
+ "use": "@now/static-build",
|
||||
+ "use": "@vercel/static-build",
|
||||
+ "config": { "distDir": "build" }
|
||||
+ }
|
||||
```
|
||||
@@ -332,12 +334,12 @@ npm install now
|
||||
3. Adding a `now-build` script in `package.json`:
|
||||
|
||||
```json
|
||||
"now-build": "npm run build"
|
||||
"vercel-build": "npm run build"
|
||||
```
|
||||
|
||||
To make a deployment, run `now`.
|
||||
To make a deployment, run `vercel`.
|
||||
|
||||
If you want your deployment aliased, run `now --target production` instead.
|
||||
If you want your deployment aliased, run `vercel --target production` instead.
|
||||
|
||||
### Stdlib
|
||||
|
||||
|
||||
@@ -6,7 +6,10 @@ If you have the previous `vue-cli` (1.x or 2.x) package installed globally, you
|
||||
:::
|
||||
|
||||
::: tip Node Version Requirement
|
||||
Vue CLI requires [Node.js](https://nodejs.org/) version 8.9 or above (8.11.0+ recommended). You can manage multiple versions of Node on the same machine with [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows).
|
||||
Vue CLI 4.x requires [Node.js](https://nodejs.org/) version 8.9 or above (v10+ recommended). You can manage multiple versions of Node on the same machine with [n](https://github.com/tj/n), [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows).
|
||||
|
||||
As Node.js v8 has reached end-of-life, it's now recommended to use Node.js v10+ for best compatibility.
|
||||
If you have to stay with Node.js v8, please make sure npm v6 is used as the default package manager. (`npm -v` to check the version, and `vue config --set packageManager npm` to set the default package manager.)
|
||||
:::
|
||||
|
||||
To install the new package, use one of the following commands. You need administrator privileges to execute these unless npm was installed on your system through a Node.js version manager (e.g. n or nvm).
|
||||
@@ -38,7 +41,7 @@ yarn global upgrade --latest @vue/cli
|
||||
|
||||
#### Project Dependencies
|
||||
|
||||
Upgrade commands shown above apply to the global Vue CLI installation. To upgrade one or more `@vue/cli` related packages (including packages starting with `@vue/cli-plugin-`) inside your project, run `vue upgrade` inside the project directory:
|
||||
Upgrade commands shown above apply to the global Vue CLI installation. To upgrade one or more `@vue/cli` related packages (including packages starting with `@vue/cli-plugin-` or `vue-cli-plugin-`) inside your project, run `vue upgrade` inside the project directory:
|
||||
|
||||
```
|
||||
Usage: upgrade [options] [plugin-name]
|
||||
@@ -46,7 +49,7 @@ Usage: upgrade [options] [plugin-name]
|
||||
(experimental) upgrade vue cli service / plugins
|
||||
|
||||
Options:
|
||||
-t, --to <version> Upgrade <package-name> to a version that is not latest
|
||||
-t, --to <version> Upgrade <plugin-name> to a version that is not latest
|
||||
-f, --from <version> Skip probing installed plugin, assuming it is upgraded from the designated version
|
||||
-r, --registry <url> Use specified npm registry when installing dependencies
|
||||
--all Upgrade all plugins
|
||||
|
||||
@@ -292,16 +292,16 @@ firebase deploy --only hosting
|
||||
|
||||
请参考 [Firebase 文档](https://firebase.google.com/docs/hosting/deploying) 来获取更多细节。
|
||||
|
||||
### ZEIT Now
|
||||
### Vercel
|
||||
|
||||
[ZEIT Now](https://zeit.co/) 是一个网站和无服务器 (Serverless) API 云平台,你可以使用你的个人域名 (或是免费的 `.now.sh` URL) 部署你的 Vue 项目。
|
||||
[Vercel](https://vercel.com/) 是一个网站和无服务器 (Serverless) API 云平台,你可以使用你的个人域名 (或是免费的 `.vercel.app` URL) 部署你的 Vue 项目。
|
||||
|
||||
#### 步骤一:安装 Now CLI
|
||||
|
||||
要使用 [npm](https://www.npmjs.com/package/now) 安装其命令行界面,运行以下命令:
|
||||
要使用 [npm](https://www.npmjs.com/package/vercel) 安装其命令行界面,运行以下命令:
|
||||
|
||||
```
|
||||
npm install -g now
|
||||
npm install -g vercel
|
||||
```
|
||||
|
||||
#### 步骤二:部署
|
||||
@@ -309,14 +309,14 @@ npm install -g now
|
||||
在项目根目录运行以下命令部署你的应用:
|
||||
|
||||
```
|
||||
now
|
||||
vercel
|
||||
```
|
||||
|
||||
**此外**,你还可以使用他们的 [GitHub](https://zeit.co/github) 或 [GitLab](https://zeit.co/gitlab) 集成服务。
|
||||
**此外**,你还可以使用他们的 [GitHub](https://vercel.com/github) 或 [GitLab](https://vercel.com/gitlab) 集成服务。
|
||||
|
||||
大功告成!
|
||||
|
||||
你的站点会开始部署,你将获得一个形如 [https://vue.now-examples.now.sh/](https://vue.now-examples.now.sh/) 的链接。
|
||||
你的站点会开始部署,你将获得一个形如 [https://vue.now-examples.now.sh/](https://vue.now-examples.now.sh/) (或`.vercel.app`)的链接。
|
||||
|
||||
开箱即用地,请求会被自动改写到 `index.html` (除了自定义的静态文件) 并带有合适的缓存请求头。
|
||||
|
||||
|
||||
@@ -6,7 +6,10 @@ Vue CLI 的包名称由 `vue-cli` 改成了 `@vue/cli`。
|
||||
:::
|
||||
|
||||
::: tip Node 版本要求
|
||||
Vue CLI 需要 [Node.js](https://nodejs.org/) 8.9 或更高版本 (推荐 8.11.0+)。你可以使用 [nvm](https://github.com/creationix/nvm) 或 [nvm-windows](https://github.com/coreybutler/nvm-windows) 在同一台电脑中管理多个 Node 版本。
|
||||
Vue CLI 4.x 需要 [Node.js](https://nodejs.org/) v8.9 或更高版本 (推荐 v10 以上)。你可以使用 [n](https://github.com/tj/n),[nvm](https://github.com/creationix/nvm) 或 [nvm-windows](https://github.com/coreybutler/nvm-windows) 在同一台电脑中管理多个 Node 版本。
|
||||
|
||||
由于 Node.js v8 已不再维护,我们建议使用 Node.js v10 以上的版本,以保证最佳的兼容性。
|
||||
如果暂时无法升级 Node.js 版本,请使用 npm v6 作为默认的包管理工具。(可以用 `npm -v` 检查 npm 版本,然后运行 `vue config --set packageManager npm` 以设置默认包管理工具。)
|
||||
:::
|
||||
|
||||
可以使用下列任一命令安装这个新的包:
|
||||
@@ -24,3 +27,33 @@ yarn global add @vue/cli
|
||||
```bash
|
||||
vue --version
|
||||
```
|
||||
|
||||
### 升级
|
||||
|
||||
如需升级全局的 Vue CLI 包,请运行:
|
||||
|
||||
``` bash
|
||||
npm update -g @vue/cli
|
||||
|
||||
# 或者
|
||||
yarn global upgrade --latest @vue/cli
|
||||
```
|
||||
|
||||
#### 项目依赖
|
||||
|
||||
上面列出来的命令是用于升级全局的 Vue CLI。如需升级项目中的 Vue CLI 相关模块(以 `@vue/cli-plugin-` 或 `vue-cli-plugin-` 开头),请在项目目录下运行 `vue upgrade`:
|
||||
|
||||
```
|
||||
用法: upgrade [options] [plugin-name]
|
||||
|
||||
(试用)升级 Vue CLI 服务及插件
|
||||
|
||||
选项:
|
||||
-t, --to <version> 升级 <plugin-name> 到指定的版本
|
||||
-f, --from <version> 跳过本地版本检测,默认插件是从此处指定的版本升级上来
|
||||
-r, --registry <url> 使用指定的 registry 地址安装依赖
|
||||
--all 升级所有的插件
|
||||
--next 检查插件新版本时,包括 alpha/beta/rc 版本在内
|
||||
-h, --help 输出帮助内容
|
||||
```
|
||||
|
||||
|
||||
@@ -191,6 +191,10 @@ GitLab 和 BitBucket 也是支持的。如果要从私有 repo 获取,请确
|
||||
``` bash
|
||||
vue create --preset gitlab:username/repo --clone my-project
|
||||
vue create --preset bitbucket:username/repo --clone my-project
|
||||
|
||||
# 私有服务器
|
||||
vue create --preset gitlab:my-gitlab-server.com:group/projectname --clone my-project
|
||||
vue create --preset direct:ssh://git@my-gitlab-server.com/group/projectname.git --clone my-project
|
||||
```
|
||||
|
||||
### 加载文件系统中的 Preset
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"packages": [
|
||||
"packages/@vue/babel-preset-app",
|
||||
"packages/@vue/cli*",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/babel-preset-app",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "babel-preset-app for vue-cli",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-init",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "init addon for vue-cli",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-overlay",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "error overlay & dev server middleware for vue-cli",
|
||||
"main": "dist/client.js",
|
||||
"files": [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-babel",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "babel plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -21,8 +21,8 @@
|
||||
"homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-plugin-babel#readme",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.11.6",
|
||||
"@vue/babel-preset-app": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/babel-preset-app": "^4.5.5",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"babel-loader": "^8.1.0",
|
||||
"cache-loader": "^4.1.0",
|
||||
"thread-loader": "^2.1.3",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-e2e-cypress",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "e2e-cypress plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -23,7 +23,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"cypress": "^3.8.3",
|
||||
"eslint-plugin-cypress": "^2.10.3"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-e2e-nightwatch",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "e2e-nightwatch plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -23,7 +23,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"deepmerge": "^4.2.2",
|
||||
"nightwatch": "^1.4.1"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-e2e-webdriverio",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "e2e-webdriverio plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/mocha": "^8.0.1",
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"@wdio/cli": "^6.4.6",
|
||||
"@wdio/local-runner": "^6.4.6",
|
||||
"@wdio/mocha-framework": "^6.4.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-eslint",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "eslint plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -23,7 +23,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"eslint-loader": "^2.2.1",
|
||||
"globby": "^9.2.0",
|
||||
"inquirer": "^7.1.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-pwa",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "pwa plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -23,7 +23,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"webpack": "^4.0.0",
|
||||
"workbox-webpack-plugin": "^4.3.1"
|
||||
},
|
||||
|
||||
@@ -85,6 +85,8 @@ test('use with Vue 3', async () => {
|
||||
|
||||
expect(files['src/main.js']).toMatch('.use(router)')
|
||||
|
||||
expect(files['src/App.vue']).not.toMatch('<div id="app">')
|
||||
|
||||
expect(pkg.dependencies).toHaveProperty('vue-router')
|
||||
expect(pkg.dependencies['vue-router']).toMatch('^4')
|
||||
})
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
---
|
||||
extend: '@vue/cli-service/generator/template/src/App.vue'
|
||||
replace:
|
||||
- !!js/regexp /<template>[^]*?<\/template>/
|
||||
- !!js/regexp /\n<script>[^]*?<\/script>\n/
|
||||
- !!js/regexp / margin-top[^]*?<\/style>/
|
||||
---
|
||||
|
||||
<%# REPLACE %>
|
||||
<template>
|
||||
<div id="nav">
|
||||
<router-link to="/">Home</router-link> |
|
||||
<router-link to="/about">About</router-link>
|
||||
</div>
|
||||
<router-view/>
|
||||
</template>
|
||||
<%# END_REPLACE %>
|
||||
|
||||
<%# REPLACE %>
|
||||
<%# END_REPLACE %>
|
||||
|
||||
<%# REPLACE %>
|
||||
}
|
||||
|
||||
<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
|
||||
<%_ if (!rootOptions.cssPreprocessor) { _%>
|
||||
#nav {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
#nav a {
|
||||
font-weight: bold;
|
||||
color: #2c3e50;
|
||||
}
|
||||
|
||||
#nav a.router-link-exact-active {
|
||||
color: #42b983;
|
||||
}
|
||||
<%_ } else { _%>
|
||||
#nav {
|
||||
padding: 30px;
|
||||
|
||||
a {
|
||||
font-weight: bold;
|
||||
color: #2c3e50;
|
||||
|
||||
&.router-link-exact-active {
|
||||
color: #42b983;
|
||||
}
|
||||
}
|
||||
}
|
||||
<%_ } _%>
|
||||
<%_ } else { _%>
|
||||
#nav
|
||||
padding 30px
|
||||
a
|
||||
font-weight bold
|
||||
color #2c3e50
|
||||
&.router-link-exact-active
|
||||
color #42b983
|
||||
<%_ } _%>
|
||||
</style>
|
||||
<%# END_REPLACE %>
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-router",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "router plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -23,10 +23,10 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/cli-shared-utils": "^4.5.4"
|
||||
"@vue/cli-shared-utils": "^4.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-test-utils": "^4.5.4"
|
||||
"@vue/cli-test-utils": "^4.5.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue/cli-service": "^3.0.0 || ^4.0.0-0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-typescript",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "typescript plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/webpack-env": "^1.15.2",
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"cache-loader": "^4.1.0",
|
||||
"fork-ts-checker-webpack-plugin": "^3.1.1",
|
||||
"globby": "^9.2.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-unit-jest",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "unit-jest plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -26,7 +26,7 @@
|
||||
"@babel/core": "^7.11.6",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.9.6",
|
||||
"@types/jest": "^24.0.19",
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-jest": "^24.9.0",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-unit-mocha",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "mocha unit testing plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-plugin-unit-mocha#readme",
|
||||
"dependencies": {
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"jsdom": "^15.2.1",
|
||||
"jsdom-global": "^3.0.2",
|
||||
"mocha": "^6.2.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-plugin-vuex",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "Vuex plugin for vue-cli",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -23,7 +23,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-test-utils": "^4.5.4"
|
||||
"@vue/cli-test-utils": "^4.5.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue/cli-service": "^3.0.0 || ^4.0.0-0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-service-global",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "vue-cli-service global addon for vue-cli",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
@@ -22,9 +22,9 @@
|
||||
},
|
||||
"homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-service-global#readme",
|
||||
"dependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.5.4",
|
||||
"@vue/cli-plugin-eslint": "^4.5.4",
|
||||
"@vue/cli-service": "^4.5.4",
|
||||
"@vue/cli-plugin-babel": "^4.5.5",
|
||||
"@vue/cli-plugin-eslint": "^4.5.5",
|
||||
"@vue/cli-service": "^4.5.5",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"chalk": "^4.1.0",
|
||||
"core-js": "^3.6.5",
|
||||
|
||||
@@ -46,4 +46,6 @@ test('Vue 3', async () => {
|
||||
expect(pkg).toHaveProperty(['devDependencies', '@vue/compiler-sfc'])
|
||||
|
||||
expect(files['src/main.js']).toMatch(`import { createApp } from 'vue'`)
|
||||
|
||||
expect(files['src/App.vue']).not.toMatch('<div id="app">')
|
||||
})
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
module.exports = (api, options) => {
|
||||
const isVue3 = (options.vueVersion === '3')
|
||||
api.render('./template', {
|
||||
isVue3,
|
||||
doesCompile: api.hasPlugin('babel') || api.hasPlugin('typescript')
|
||||
})
|
||||
|
||||
if (isVue3) {
|
||||
if (options.vueVersion === '3') {
|
||||
api.extendPackage({
|
||||
dependencies: {
|
||||
'vue': '^3.0.0-0'
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
<template>
|
||||
<%_ if (rootOptions.vueVersion === '3') { _%>
|
||||
<img alt="Vue logo" src="./assets/logo.png">
|
||||
<%_ if (!rootOptions.bare) { _%>
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
<%_ } else { _%>
|
||||
<h1>Welcome to Your Vue.js App</h1>
|
||||
<%_ } _%>
|
||||
<%_ } else { _%>
|
||||
<div id="app">
|
||||
<img alt="Vue logo" src="./assets/logo.png">
|
||||
<%_ if (!rootOptions.bare) { _%>
|
||||
@@ -7,6 +15,7 @@
|
||||
<h1>Welcome to Your Vue.js App</h1>
|
||||
<%_ } _%>
|
||||
</div>
|
||||
<%_ } _%>
|
||||
</template>
|
||||
<%_ if (!rootOptions.bare) { _%>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%_ if (isVue3) { _%>
|
||||
<%_ if (rootOptions.vueVersion === '3') { _%>
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
|
||||
@@ -133,7 +133,10 @@ module.exports = (api, options) => {
|
||||
.end()
|
||||
.use('vue-loader')
|
||||
.loader(require.resolve('vue-loader-v16'))
|
||||
.options(vueLoaderCacheConfig)
|
||||
.options({
|
||||
...vueLoaderCacheConfig,
|
||||
babelParserPlugins: ['jsx', 'classProperties', 'decorators-legacy']
|
||||
})
|
||||
.end()
|
||||
.end()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-service",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "local service for vue-cli projects",
|
||||
"main": "lib/Service.js",
|
||||
"typings": "types/index.d.ts",
|
||||
@@ -29,10 +29,10 @@
|
||||
"@types/minimist": "^1.2.0",
|
||||
"@types/webpack": "^4.0.0",
|
||||
"@types/webpack-dev-server": "^3.11.0",
|
||||
"@vue/cli-overlay": "^4.5.4",
|
||||
"@vue/cli-plugin-router": "^4.5.4",
|
||||
"@vue/cli-plugin-vuex": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-overlay": "^4.5.5",
|
||||
"@vue/cli-plugin-router": "^4.5.5",
|
||||
"@vue/cli-plugin-vuex": "^4.5.5",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"@vue/component-compiler-utils": "^3.1.2",
|
||||
"@vue/preload-webpack-plugin": "^1.1.0",
|
||||
"@vue/web-component-wrapper": "^1.2.0",
|
||||
@@ -80,7 +80,7 @@
|
||||
"webpack-merge": "^4.2.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"vue-loader-v16": "npm:vue-loader@^16.0.0-beta.3"
|
||||
"vue-loader-v16": "npm:vue-loader@^16.0.0-beta.7"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@vue/compiler-sfc": "^3.0.0-beta.14",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-shared-utils",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "shared utilities for vue-cli packages",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-test-utils",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "test utilities for vue-cli packages",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-ui-addon-webpack",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vuejs/vue-cli.git",
|
||||
@@ -18,9 +18,9 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.5.4",
|
||||
"@vue/cli-plugin-eslint": "^4.5.4",
|
||||
"@vue/cli-service": "^4.5.4",
|
||||
"@vue/cli-plugin-babel": "^4.5.5",
|
||||
"@vue/cli-plugin-eslint": "^4.5.5",
|
||||
"@vue/cli-service": "^4.5.5",
|
||||
"@vue/eslint-config-standard": "^5.1.2",
|
||||
"core-js": "^3.6.5",
|
||||
"eslint": "^6.7.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-ui-addon-widgets",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vuejs/vue-cli.git",
|
||||
@@ -18,9 +18,9 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.5.4",
|
||||
"@vue/cli-plugin-eslint": "^4.5.4",
|
||||
"@vue/cli-service": "^4.5.4",
|
||||
"@vue/cli-plugin-babel": "^4.5.5",
|
||||
"@vue/cli-plugin-eslint": "^4.5.5",
|
||||
"@vue/cli-service": "^4.5.5",
|
||||
"@vue/eslint-config-standard": "^5.1.2",
|
||||
"core-js": "^3.6.5",
|
||||
"eslint": "^6.7.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli-ui",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vuejs/vue-cli.git",
|
||||
@@ -35,7 +35,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@akryum/winattr": "^3.0.0",
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"apollo-server-express": "^2.17.0",
|
||||
"clone": "^2.1.1",
|
||||
"deepmerge": "^4.2.2",
|
||||
@@ -65,10 +65,10 @@
|
||||
"watch": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.5.4",
|
||||
"@vue/cli-plugin-e2e-cypress": "^4.5.4",
|
||||
"@vue/cli-plugin-eslint": "^4.5.4",
|
||||
"@vue/cli-service": "^4.5.4",
|
||||
"@vue/cli-plugin-babel": "^4.5.5",
|
||||
"@vue/cli-plugin-e2e-cypress": "^4.5.5",
|
||||
"@vue/cli-plugin-eslint": "^4.5.5",
|
||||
"@vue/cli-service": "^4.5.5",
|
||||
"@vue/eslint-config-standard": "^5.1.2",
|
||||
"@vue/ui": "^0.11.6",
|
||||
"ansi_up": "^4.0.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vue/cli",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "Command line interface for rapid Vue.js development",
|
||||
"bin": {
|
||||
"vue": "bin/vue.js"
|
||||
@@ -27,10 +27,10 @@
|
||||
"dependencies": {
|
||||
"@types/ejs": "^2.7.0",
|
||||
"@types/inquirer": "^7.3.1",
|
||||
"@vue/cli-shared-utils": "^4.5.4",
|
||||
"@vue/cli-ui": "^4.5.4",
|
||||
"@vue/cli-ui-addon-webpack": "^4.5.4",
|
||||
"@vue/cli-ui-addon-widgets": "^4.5.4",
|
||||
"@vue/cli-shared-utils": "^4.5.5",
|
||||
"@vue/cli-ui": "^4.5.5",
|
||||
"@vue/cli-ui-addon-webpack": "^4.5.5",
|
||||
"@vue/cli-ui-addon-widgets": "^4.5.5",
|
||||
"boxen": "^4.1.0",
|
||||
"cmd-shim": "^3.0.3",
|
||||
"commander": "^2.20.0",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "vue-cli-version-marker",
|
||||
"version": "4.5.4",
|
||||
"version": "4.5.5",
|
||||
"description": "version marker for @vue/cli",
|
||||
"author": "Evan You",
|
||||
"license": "MIT",
|
||||
"main": "package.json",
|
||||
"devDependencies": {
|
||||
"@vue/cli": "^4.5.4"
|
||||
"@vue/cli": "^4.5.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19970,10 +19970,10 @@ vue-jest@^3.0.5:
|
||||
tsconfig "^7.0.0"
|
||||
vue-template-es2015-compiler "^1.6.0"
|
||||
|
||||
"vue-loader-v16@npm:vue-loader@^16.0.0-beta.3":
|
||||
version "16.0.0-beta.4"
|
||||
resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-16.0.0-beta.4.tgz#1d9d7894f430992096727c4414bcf3b1ae8c1be9"
|
||||
integrity sha512-uh/+SIwoN+hny0+GqxdkTuEmt1NV4wb8etF5cKkB1YVMv29ck0byrmkt8IIYadQ3r/fiYsr2brGJqP+hytQwuw==
|
||||
"vue-loader-v16@npm:vue-loader@^16.0.0-beta.7":
|
||||
version "16.0.0-beta.7"
|
||||
resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-16.0.0-beta.7.tgz#6f2726fa0e2b1fbae67895c47593bbf69f2b9ab8"
|
||||
integrity sha512-xQ8/GZmRPdQ3EinnE0IXwdVoDzh7Dowo0MowoyBuScEBXrRabw6At5/IdtD3waKklKW5PGokPsm8KRN6rvQ1cw==
|
||||
dependencies:
|
||||
"@types/mini-css-extract-plugin" "^0.9.1"
|
||||
chalk "^3.0.0"
|
||||
|
||||
Reference in New Issue
Block a user