Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Commit 8e8bf84

Browse files
author
xiezhihong
committed
chore: lint before build
1 parent 3a2efff commit 8e8bf84

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"serve": "vue-cli-service serve",
1616
"build:example": "vue-cli-service build --dest demo",
1717
"build:lib": "vue-cli-service build --target lib --name vue-item-list-selector src/index.vue",
18-
"lint": "vue-cli-service lint",
18+
"lint": "cross-env NODE_ENV=production vue-cli-service lint",
1919
"test:unit": "vue-cli-service test:unit",
2020
"release": "node scripts/release.js"
2121
},
@@ -44,6 +44,7 @@
4444
"babel-core": "7.0.0-bridge.0",
4545
"babel-eslint": "^10.0.1",
4646
"babel-jest": "^23.6.0",
47+
"cross-env": "^5.2.0",
4748
"eslint": "^5.8.0",
4849
"eslint-plugin-vue": "^5.0.0-0",
4950
"less": "^3.0.4",

scripts/release.js

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const release = async () => {
4444
])
4545

4646
if (yes) {
47+
await execa('npm', ['run', 'lint'], { stdio: 'inherit' })
4748
await execa('npm', ['run', 'build:lib'], { stdio: 'inherit' })
4849
await execa('npm', ['run', 'build:example'], { stdio: 'inherit' })
4950
await execa('git', ['add', 'dist', 'demo'], { stdio: 'inherit' })

yarn.lock

+9-1
Original file line numberDiff line numberDiff line change
@@ -2475,6 +2475,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
24752475
safe-buffer "^5.0.1"
24762476
sha.js "^2.4.8"
24772477

2478+
cross-env@^5.2.0:
2479+
version "5.2.0"
2480+
resolved "https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
2481+
integrity sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==
2482+
dependencies:
2483+
cross-spawn "^6.0.5"
2484+
is-windows "^1.0.0"
2485+
24782486
cross-spawn@^5.0.1, cross-spawn@^5.1.0:
24792487
version "5.1.0"
24802488
resolved "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -5036,7 +5044,7 @@ is-whitespace@^0.3.0:
50365044
resolved "http://registry.npm.taobao.org/is-whitespace/download/is-whitespace-0.3.0.tgz#1639ecb1be036aec69a54cbb401cfbed7114ab7f"
50375045
integrity sha1-Fjnssb4DauxppUy7QBz77XEUq38=
50385046

5039-
is-windows@^1.0.2:
5047+
is-windows@^1.0.0, is-windows@^1.0.2:
50405048
version "1.0.2"
50415049
resolved "http://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
50425050
integrity sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=

0 commit comments

Comments
 (0)