mirror of
https://github.com/element-plus/element-plus.git
synced 2025-04-06 16:30:35 +08:00
chore(project): adding a script for upgrading vue version (#660)
* chore(project): adding a script for upgrading vue version * Update locale.spec.ts Co-authored-by: zazzaz <izazzaz@hotmail.com>
This commit is contained in:
parent
fcc5ea27d3
commit
41655b6847
@ -20,7 +20,8 @@
|
||||
"lint-fix": "eslint --fix ./packages --ext .vue,.js,.ts",
|
||||
"website-build": "rimraf website-dist && cross-env NODE_ENV=production webpack --config ./website/webpack.config.js",
|
||||
"website-dev": "webpack-dev-server --config ./website/webpack.config.js",
|
||||
"website-dev:play": "cross-env PLAY_ENV=true yarn website-dev"
|
||||
"website-dev:play": "cross-env PLAY_ENV=true yarn website-dev",
|
||||
"upgrade:vue": "bash ./scripts/update-versions.sh"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.0.0"
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import { t, use } from '../index'
|
||||
import zhCn from '../lang/zh-cn'
|
||||
import en from '../lang/en'
|
||||
|
12
scripts/update-versions.sh
Normal file
12
scripts/update-versions.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#! /bin/bash
|
||||
|
||||
export FILE_PATH="$(cd $(dirname "${BASH_SOURCE[0]}")/../packages/ && pwd)"
|
||||
SED_REX="s/\"vue\": \"\^[0-9]\.[0-9]\.[0-9].*\"/\"vue\": \"$1\"/"
|
||||
|
||||
for FILE_NAME in "$(find ${FILE_PATH} -type f -name 'package.json' | cut -d' ' -f1-)"
|
||||
do
|
||||
sed -i '' "${SED_REX}" $FILE_NAME
|
||||
done
|
||||
|
||||
sed -i '' "${SED_REX}" "$(dirname ${BASH_SOURCE[0]})/gc.sh"
|
||||
sed -i '' "${SED_REX}" "$(dirname ${BASH_SOURCE[0]})/../package.json"
|
Loading…
x
Reference in New Issue
Block a user