diff --git a/package.json b/package.json index 98014c54fa..32b8fe3180 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,7 @@ "gen": "bash ./scripts/gc.sh", "bootstrap": "yarn --frozen-lockfile && npx lerna bootstrap && yarn gen:version", "gen:version": "esno build/gen-version.ts", - "build": "yarn bootstrap && yarn clean:lib && yarn build:esm-bundle && yarn build:lib && yarn build:lib-full && yarn build:esm && yarn build:utils && yarn build:locale && yarn build:locale-umd && yarn build:theme && yarn build:helper", "clean:lib": "rimraf lib && rimraf es && rimraf dist", - "build:lib": "cross-env LIBMODE=core webpack --config ./build/webpack.config.js", - "build:lib-full": "cross-env LIBMODE=full webpack --config ./build/webpack.config.js", - "build:esm-bundle": "rollup --config ./build/rollup.config.bundle.js && yarn build:type", "build:locale-umd": "esno ./build/build-locale.ts", "build:helper": "esno build/build-helper.ts", "build:indices": "esno build/build-indices.ts", @@ -31,9 +27,7 @@ "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", - "upgrade:vue": "bash ./scripts/update-versions.sh", - "fast-build": "sh ./scripts/build.sh" + "website-dev:play": "cross-env PLAY_ENV=true yarn website-dev" }, "peerDependencies": { "vue": "^3.2.0" @@ -113,6 +107,7 @@ "transliteration": "^2.1.11", "ts-loader": "^8.0.3", "ts-morph": "^11.0.3", + "ts-node": "^10.1.0", "typescript": "^4.3.5", "url-loader": "^4.1.0", "vue": "^3.2.0", diff --git a/packages/components/dropdown/src/dropdown.vue b/packages/components/dropdown/src/dropdown.vue index 55b2a97df9..28804c7d97 100644 --- a/packages/components/dropdown/src/dropdown.vue +++ b/packages/components/dropdown/src/dropdown.vue @@ -84,7 +84,7 @@ export default defineComponent({ }, props: { trigger: { - type: String as PropType, + type: String as PropType, default: 'hover', }, type: String as PropType, diff --git a/packages/directives/package.json b/packages/directives/package.json index 0e75b7a897..bb1cc8866c 100644 --- a/packages/directives/package.json +++ b/packages/directives/package.json @@ -25,6 +25,7 @@ "gulp": "^4.0.2", "gulp-typescript": "^6.0.0-alpha.1", "sass": "^1.37.0", + "ts-node": "^10.1.0", "typescript": "^4.3.5" }, "gitHead": "c69724230befa8fede0e6b9c37fb0b7e39fd7cdd" diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 8e7b1016a5..9050608031 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -28,6 +28,7 @@ "gulp": "^4.0.2", "gulp-typescript": "^6.0.0-alpha.1", "sass": "^1.37.0", + "ts-node": "^10.1.0", "typescript": "^4.3.5" }, "gitHead": "c69724230befa8fede0e6b9c37fb0b7e39fd7cdd" diff --git a/packages/locale/package.json b/packages/locale/package.json index 7d9c92e36b..2aedaa91c8 100644 --- a/packages/locale/package.json +++ b/packages/locale/package.json @@ -23,6 +23,7 @@ "gulp": "^4.0.2", "gulp-typescript": "^6.0.0-alpha.1", "sass": "^1.37.0", + "ts-node": "^10.1.0", "typescript": "^4.3.5" }, "gitHead": "c69724230befa8fede0e6b9c37fb0b7e39fd7cdd" diff --git a/packages/theme-chalk/package.json b/packages/theme-chalk/package.json index 966bc01a66..a24de3b622 100644 --- a/packages/theme-chalk/package.json +++ b/packages/theme-chalk/package.json @@ -40,6 +40,7 @@ "gulp-rename": "^2.0.0", "gulp-sass": "^5.0.0", "sass": "^1.37.0", + "ts-node": "^10.1.0", "typescript": "^4.3.5" }, "dependencies": {}, diff --git a/packages/theme-chalk/src/checkbox-button.scss b/packages/theme-chalk/src/checkbox-button.scss index 922a0492d6..edaa6edfc6 100644 --- a/packages/theme-chalk/src/checkbox-button.scss +++ b/packages/theme-chalk/src/checkbox-button.scss @@ -22,14 +22,14 @@ vertical-align: middle; cursor: pointer; background: var( - --el-button-default-background-color, - map.get($--button, 'default-background-color') + --el-button-background-color, + map.get($--button, 'background-color') ); border: $--border-base; border-left: 0; color: var( - --el-button-default-font-color, - map.get($--button, 'default-font-color') + --el-button-font-color, + map.get($--button, 'font-color') ); -webkit-appearance: none; text-align: center; diff --git a/packages/theme-chalk/src/radio-button.scss b/packages/theme-chalk/src/radio-button.scss index 88dc8cf4dd..104e1e8b31 100644 --- a/packages/theme-chalk/src/radio-button.scss +++ b/packages/theme-chalk/src/radio-button.scss @@ -21,8 +21,8 @@ white-space: nowrap; vertical-align: middle; background: var( - --el-button-default-background-color, - map.get($--button, 'default-background-color') + --el-button-background-color, + map.get($--button, 'background-color') ); border: $--border-base; font-weight: var( @@ -31,8 +31,8 @@ ); border-left: 0; color: var( - --el-button-default-font-color, - map.get($--button, 'default-font-color') + --el-button-font-color, + map.get($--button, 'font-color') ); -webkit-appearance: none; text-align: center; diff --git a/packages/tokens/package.json b/packages/tokens/package.json index 2d7dc9dfd9..94aa5c2904 100644 --- a/packages/tokens/package.json +++ b/packages/tokens/package.json @@ -27,6 +27,7 @@ "gulp": "^4.0.2", "gulp-typescript": "^6.0.0-alpha.1", "sass": "^1.37.0", + "ts-node": "^10.1.0", "typescript": "^4.3.5" }, "gitHead": "c69724230befa8fede0e6b9c37fb0b7e39fd7cdd" diff --git a/packages/utils/package.json b/packages/utils/package.json index a6b0968098..509b0e3a52 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -20,6 +20,7 @@ "gulp": "^4.0.2", "gulp-typescript": "^6.0.0-alpha.1", "sass": "^1.37.0", + "ts-node": "^10.1.0", "typescript": "^4.3.5" }, "gitHead": "c69724230befa8fede0e6b9c37fb0b7e39fd7cdd" diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100644 index 6b5b3c3c0d..0000000000 --- a/scripts/build.sh +++ /dev/null @@ -1,63 +0,0 @@ -#! /usr/bin/bash - - -# echo `node ./build/build.js ./packages/button` -# find all folders under root/packages excludes -# *utils, __mocks__ directives hooks locale theme* -# which means the result will not contain folder name includes utils -yarn bootstrap -yarn clean:lib -yarn build:type - -yarn build:lib -yarn build:lib-full - -yarn build:components - -find ./packages/utils -type f ! -name '*.test.ts' ! -name 'package.json' -print0 \ -| xargs -P2 -0 -I {} node ./build/build-util.js {} - -node ./build/build.entry.js - -find ./packages/locale -type f ! -name '*.spec.ts' ! -name 'package.json' ! -name '.DS_Store' -print0 \ -| xargs -P2 -0 -I {} node ./build/build-util.js {} - -yarn build:locale-umd - -yarn build:theme - -yarn build:helper - -echo "Copying types" -# Post build cp type definitions -touch temp -cd ./dist -find . -maxdepth 1 ! -path . -type d ! -name 'element-plus' -print0 | xargs -0 -I {} sh -c "basename {}" > ../temp -cd - -input="./temp" - -mkdir -p tempDir -while IFS= read -r line -do - filepath="el-$line" - case "$line" in - directives|locale|utils|hooks) - filepath="$line" - ;; - esac - mv "dist/$line" "tempDir/$filepath" - rsync -a tempDir/ es/ - rsync -a tempDir/ lib/ - -done < "$input" - -cp packages/utils/types.ts es/utils/ -cp dist/element-plus/* lib -cp packages/utils/types.ts lib/utils/ -cp dist/element-plus/* es - - -echo "Remove temp files" -# Post build cleanup -rm -rf temp -rm -rf tempDir diff --git a/scripts/publish.sh b/scripts/publish.sh deleted file mode 100644 index 15f93f3c98..0000000000 --- a/scripts/publish.sh +++ /dev/null @@ -1,13 +0,0 @@ -#! /usr/bin/bash - -# Do not run this file without setting the environment variables, you will end up fatal error -# If you wish to run this locally, please change the env variable before running this. -# echo "//${REGISTRY}/:_authToken=${TOKEN}" > .npmrc - -cat package.json \ -| grep -v '"private":' \ -| grep -v '"version":' \ -| sed "s/\(\"name\": \"element-plus\"\)/\1,\n \"version\": \"${TAG_VERSION}\"/g" > package.json.bak - -cat package.json.bak > package.json -npm publish --registry ${REGISTRY} diff --git a/yarn.lock b/yarn.lock index 006d1c927a..f0cad33581 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1175,6 +1175,18 @@ version "9.1.2" resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-9.1.2.tgz#d05f66db03e3a3638a654e8badf2deb489eb220d" +"@cspotcode/source-map-consumer@0.8.0": + version "0.8.0" + resolved "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" + integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== + +"@cspotcode/source-map-support@0.6.1": + version "0.6.1" + resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.6.1.tgz#118511f316e2e87ee4294761868e254d3da47960" + integrity sha512-DX3Z+T5dt1ockmPdobJS/FAsQPW4V4SrWEhD2iYQT2Cb2tQsiMnYxrcUH9By/Z3B+v0S5LMBkQtV/XOBbpLEOg== + dependencies: + "@cspotcode/source-map-consumer" "0.8.0" + "@element-plus/icons@^0.0.11": version "0.0.11" resolved "https://registry.yarnpkg.com/@element-plus/icons/-/icons-0.0.11.tgz#9b187c002774548b911850d17fa5fc2f9a515f57" @@ -2421,6 +2433,26 @@ mkdirp "^1.0.4" path-browserify "^1.0.1" +"@tsconfig/node10@^1.0.7": + version "1.0.8" + resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" + integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== + +"@tsconfig/node12@^1.0.7": + version "1.0.9" + resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" + integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== + +"@tsconfig/node14@^1.0.0": + version "1.0.1" + resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" + integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== + +"@tsconfig/node16@^1.0.2": + version "1.0.2" + resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" + integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== + "@types/anymatch@*": version "1.3.1" resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" @@ -3186,6 +3218,11 @@ acorn-walk@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" +acorn-walk@^8.1.1: + version "8.1.1" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.1.tgz#3ddab7f84e4a7e2313f6c414c5b7dac85f4e3ebc" + integrity sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w== + acorn@^6.4.1: version "6.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" @@ -3195,6 +3232,11 @@ acorn@^7.1.1, acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.4.1: + version "8.4.1" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== + agent-base@4, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" @@ -3438,6 +3480,11 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -5172,6 +5219,11 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + cross-env@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.2.tgz#bd5ed31339a93a3418ac4f3ca9ca3403082ae5f9" @@ -5706,6 +5758,11 @@ diff-sequences@^26.6.2: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -9551,9 +9608,10 @@ make-dir@^3.0.0, make-dir@^3.0.2: dependencies: semver "^6.0.0" -make-error@1.x: +make-error@1.x, make-error@^1.1.1: version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== make-fetch-happen@^5.0.0: version "5.0.2" @@ -13805,6 +13863,24 @@ ts-morph@^11.0.3: "@ts-morph/common" "~0.10.1" code-block-writer "^10.1.1" +ts-node@^10.1.0: + version "10.2.1" + resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.2.1.tgz#4cc93bea0a7aba2179497e65bb08ddfc198b3ab5" + integrity sha512-hCnyOyuGmD5wHleOQX6NIjJtYVIO8bPP8F2acWkB4W06wdlkgyvJtubO/I9NkI88hCFECbsEgoLc0VNkYmcSfw== + dependencies: + "@cspotcode/source-map-support" "0.6.1" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + yn "3.1.1" + tslib@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" @@ -15010,3 +15086,8 @@ yargs@^7.1.0: which-module "^1.0.0" y18n "^3.2.1" yargs-parser "5.0.0-security.0" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==