From 69b499a8b7ddaedb65d0be649e618709ffb84fb3 Mon Sep 17 00:00:00 2001 From: richard1015 <51844712@qq.com> Date: Wed, 4 Jan 2023 16:25:51 +0800 Subject: [PATCH] release: v3.3.2 --- CHANGELOG.md | 20 +++++++ README.md | 4 +- README_EN.md | 4 +- jd/generate-entry-es.js | 60 ++++--------------- package.json | 7 +-- publish/nutui-taro/CHANGELOG.md | 20 +++++++ publish/nutui-taro/README.md | 4 +- publish/nutui-taro/package.json | 101 +------------------------------- publish/nutui/CHANGELOG.md | 20 +++++++ publish/nutui/README.md | 4 +- publish/nutui/package.json | 98 +++---------------------------- 11 files changed, 94 insertions(+), 248 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6ff390690..457d1ad55b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +## v3.3.2 + +`2022-1-4` + +小程序版本依赖 Taro ^3.5.6 + +NutUI 非常感谢您对开源事业做出的贡献!🌷🌷🌷 +本次社区贡献者 @gyt95 @zy-hub @HuziG + + +* :zap: chore: vite工具按需加载功能修复(测试 Button 组件减少193kb) @richard1015 +* :zap: feat(tabs): 支持点击时自动居中功能 @gyt95 +* :zap: feat(menu): taro 环境新增 open、close方法 (#1985) @yangjinjun3 +* :zap: feat(popup): popup增加自定义遮罩层类名及样式 (#1962) @zy-hub +* :bug: fix(price): add new props strike-through (#1934)(#1907) @Drjingfubo +* :bug: fix(tabbar): router jump problem (#1993) @Drjingfubo +* :bug: fix(barrage): 小程序不展示问题处理 (#1987) @Ymm0008 +* 📖 docs(uploader): 组件的文档补充 (#1949) @HuziG + + ## v3.3.1 `2022-12-16` diff --git a/README.md b/README.md index 28dcf09c0a..5bea421e73 100644 --- a/README.md +++ b/README.md @@ -83,12 +83,12 @@ npm i @nutui/nutui@2 ```bash // Vue3 H5 项目 -npm i @nutui/nutui +npm i @nutui/nutui@3 ``` ```bash // Vue3 小程序项目 -npm i @nutui/nutui-taro +npm i @nutui/nutui-taro@3 ``` ## 示例 diff --git a/README_EN.md b/README_EN.md index 9d1f6052af..176280194b 100644 --- a/README_EN.md +++ b/README_EN.md @@ -83,12 +83,12 @@ npm i @nutui/nutui@2 ```bash // Vue3 H5 -npm i @nutui/nutui +npm i @nutui/nutui@3 ``` ```bash // Vue3 Mini Programs -npm i @nutui/nutui-taro +npm i @nutui/nutui-taro@3 ``` ## Usage diff --git a/jd/generate-entry-es.js b/jd/generate-entry-es.js index 36178acb1b..5d36ef9768 100644 --- a/jd/generate-entry-es.js +++ b/jd/generate-entry-es.js @@ -16,32 +16,24 @@ config.nav.forEach((item) => { children: element.styleDeps }); // gen entry - if (element.exclude != true) { - let outputMjs = ''; - if (element.type == 'methods') { - outputMjs = `import _${element.name} from '../_es/${element.name}.js'; -import { show${element.name} } from '../_es/${element.name}.js'; -const treeshaking = (t) => t; -const ${element.name} = treeshaking(_${element.name}); -export { ${element.name}, show${element.name} };`; - } else { - outputMjs = `import _${element.name} from '../_es/${element.name}.js'; + let outputMjs = `import _${element.name} from '../_es/${element.name}.js'; const treeshaking = (t) => t; const ${element.name} = treeshaking(_${element.name}); export { ${element.name} };`; - } - tasks.push( - fs.outputFile(path.resolve(__dirname, `../dist/packages/${element.name}/index.mjs`), outputMjs, 'utf8', () => { - // console.log('') - }) - ); - let folderName = element.name.toLowerCase(); - outputFileEntry += `export * from "./packages/${folderName}/index.mjs";\n`; - components.push(element.name); - } + + tasks.push( + fs.outputFile(path.resolve(__dirname, `../dist/packages/${element.name}/index.mjs`), outputMjs, 'utf8', () => { + // console.log('') + }) + ); + let folderName = element.name.toLowerCase(); + outputFileEntry += `export * from "./packages/${folderName}/index.mjs";\n`; + components.push(element.name); }); }); -outputFileEntry += components.map((name) => `import { ${name} } from "./packages/${name}/index.mjs";`).join('\n'); +outputFileEntry += components + .map((name) => `import { ${name} } from "./packages/${name.toLowerCase()}/index.mjs";`) + .join('\n'); outputFileEntry += `\nimport { Locale } from "./packages/locale/lang"; function install(app) { const packages = [${components.join(',')}]; @@ -72,30 +64,4 @@ tasks.push( }) ); -styleMap.forEach((value) => { - if (value.children && value.children.length > 0) { - value.children.forEach((item, index) => { - value.children[index] = styleMap.get(item); - }); - } -}); - -const getAllDeps = (styleObj, key) => { - const value = styleObj; - if (value.children?.length === 0) { - return [value.name]; - } else { - let deps = []; - value.children?.forEach((item) => { - if (key === item.name) { - console.error('generate-style-deps: 存在循环引用', key); - return []; - } - deps = deps.concat(getAllDeps(item, key)); - }); - deps.unshift(value.name); - return [...new Set(deps)]; - } -}; - Promise.all(tasks); diff --git a/package.json b/package.json index 5e11cc5511..51fa394965 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nutui/nutui", - "version": "3.3.1", + "version": "3.3.2", "description": "京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)", "main": "dist/nutui.umd.js", "module": "dist/nutui.es.js", @@ -48,8 +48,8 @@ "build:site": "npm run checked && vite build", "build:site-jdt": "npm run checked && vite build --config vite.config.jdt.ts ", "build:site:oss": "npm run checked && vite build --base=/nutui/3x/", - "build": "npm run checked && vite build --config vite.config.build.ts && vite build --config vite.config.build.disperse.ts && npm run generate:types && npm run generate:themes && vite build --config vite.config.build.css.ts && vite build --config vite.config.build.locale.ts && npm run attrs && npm run generate-entry-es && node jd/copy-dist.js nutui", - "build:taro:vue": "npm run checked:taro:vue && vite build --config vite.config.build.taro.vue.ts && vite build --config vite.config.build.taro.vue.disperse.ts && npm run generate:types:taro && npm run generate:themes && vite build --config vite.config.build.css.ts && vite build --config vite.config.build.locale.ts && npm run attrs && npm run generate-entry-es && node jd/copy-dist.js nutui-taro", + "build": "npm run checked && vite build --config vite.config.build.ts && vite build --config vite.config.build.disperse.ts && npm run generate:types && npm run generate:themes && vite build --config vite.config.build.css.ts && vite build --config vite.config.build.locale.ts && npm run attrs && node jd/generate-entry-es.js && node jd/copy-dist.js nutui", + "build:taro:vue": "npm run checked:taro:vue && vite build --config vite.config.build.taro.vue.ts && vite build --config vite.config.build.taro.vue.disperse.ts && npm run generate:types:taro && npm run generate:themes && vite build --config vite.config.build.css.ts && vite build --config vite.config.build.locale.ts && npm run attrs && node jd/copy-dist.js nutui-taro", "serve": "vite preview", "upload": "yarn build:site:oss && node ./jd/upload.js", "add": "node jd/createComponentMode.js", @@ -60,7 +60,6 @@ "generate:types": "node jd/generate-types.js", "generate:types:taro": "node jd/generate-types-taro.js", "generate:themes": "node jd/generate-themes.js", - "generate-entry-es": "node jd/generate-entry-es.js", "prepare": "husky install", "test": "jest", "release": "standard-version -a", diff --git a/publish/nutui-taro/CHANGELOG.md b/publish/nutui-taro/CHANGELOG.md index a6ff390690..457d1ad55b 100644 --- a/publish/nutui-taro/CHANGELOG.md +++ b/publish/nutui-taro/CHANGELOG.md @@ -1,3 +1,23 @@ +## v3.3.2 + +`2022-1-4` + +小程序版本依赖 Taro ^3.5.6 + +NutUI 非常感谢您对开源事业做出的贡献!🌷🌷🌷 +本次社区贡献者 @gyt95 @zy-hub @HuziG + + +* :zap: chore: vite工具按需加载功能修复(测试 Button 组件减少193kb) @richard1015 +* :zap: feat(tabs): 支持点击时自动居中功能 @gyt95 +* :zap: feat(menu): taro 环境新增 open、close方法 (#1985) @yangjinjun3 +* :zap: feat(popup): popup增加自定义遮罩层类名及样式 (#1962) @zy-hub +* :bug: fix(price): add new props strike-through (#1934)(#1907) @Drjingfubo +* :bug: fix(tabbar): router jump problem (#1993) @Drjingfubo +* :bug: fix(barrage): 小程序不展示问题处理 (#1987) @Ymm0008 +* 📖 docs(uploader): 组件的文档补充 (#1949) @HuziG + + ## v3.3.1 `2022-12-16` diff --git a/publish/nutui-taro/README.md b/publish/nutui-taro/README.md index 28dcf09c0a..5bea421e73 100644 --- a/publish/nutui-taro/README.md +++ b/publish/nutui-taro/README.md @@ -83,12 +83,12 @@ npm i @nutui/nutui@2 ```bash // Vue3 H5 项目 -npm i @nutui/nutui +npm i @nutui/nutui@3 ``` ```bash // Vue3 小程序项目 -npm i @nutui/nutui-taro +npm i @nutui/nutui-taro@3 ``` ## 示例 diff --git a/publish/nutui-taro/package.json b/publish/nutui-taro/package.json index 96ccd4d482..df70f79773 100644 --- a/publish/nutui-taro/package.json +++ b/publish/nutui-taro/package.json @@ -5,12 +5,7 @@ "main": "dist/nutui.umd.cjs", "module": "dist/nutui.es.js", "style": "dist/style.css", - "type": "module", "typings": "dist/types/index.d.ts", - "sideEffects": [ - "dist/packages/_es/*", - "dist/packages/**/style*" - ], "vetur": { "tags": "dist/smartips/tags.json", "attributes": "dist/smartips/attributes.json" @@ -44,102 +39,12 @@ "CHANGELOG.md" ], "scripts": { - "publish:beta": "npm publish --tag=beta" - }, - "standard-version": { - "scripts": { - "postchangelog": "node ./jd/updateChangelog.js" - } + "publish:beta": "npm publish --tag=beta", + "publish-release": "npm publish --tag=latest-v3" }, "dependencies": { - "@nutui/icons-vue-taro": "0.0.3", "@tarojs/components": "3.5.6", - "sass": "^1.50.0", - "vscode": "^1.1.37", - "vue-router": "^4.0.12" - }, - "devDependencies": { - "@commitlint/cli": "^10.0.0", - "@commitlint/config-conventional": "^10.0.0", - "@tarojs/cli": "3.5.6", - "@tarojs/mini-runner": "3.5.6", - "@tarojs/plugin-framework-vue3": "3.5.6", - "@tarojs/plugin-html": "3.5.6", - "@tarojs/plugin-platform-weapp": "3.5.6", - "@tarojs/runtime": "3.5.6", - "@tarojs/taro": "3.5.6", - "@tarojs/webpack5-runner": "3.5.6", - "@types/jest": "^26.0.22", - "@types/node": "^17.0.16", - "@typescript-eslint/eslint-plugin": "^4.20.0", - "@typescript-eslint/parser": "^4.20.0", - "@vitejs/plugin-vue": "^4.0.0", - "@vue/compiler-dom": "^3.2.45", - "@vue/compiler-sfc": "^3.2.45", - "@vue/eslint-config-prettier": "^6.0.0", - "@vue/eslint-config-typescript": "^7.0.0", - "@vue/test-utils": "^2.0.0-rc.18", - "autoprefixer": "^10.3.4", - "axios": "^0.21.0", - "babel-preset-taro": "3.5.6", - "canvas": "^2.9.0", - "codesandbox": "^2.2.3", - "eslint": "^7.23.2", - "eslint-config-taro": "3.5.6", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-vue": "^7.8.0", - "eslint-visitor-keys": "2", - "fs-extra": "^9.1.0", - "highlight.js": "^10.3.1", - "husky": "^6.0.0", - "inquirer": "^8.2.0", - "jest": "^26.6.3", - "lint-staged": "^10.5.0", - "lzutf8": "0.6.0", - "markdown-it": "^13.0.1", - "markdown-it-container": "^3.0.0", - "prettier": "^2.0.0", - "remark-codesandbox": "^0.10.1", - "rollup-plugin-visualizer": "^5.8.3", - "standard-version": "^9.3.0", - "swiper": "6.5.1", - "transliteration": "^2.2.0", - "ts-jest": "^26.5.5", - "typescript": "^4.9.3", - "vite": "^4.0.0", - "vite-plugin-md": "^0.21.5", - "vue": "^3.2.24", - "vue-jest": "^5.0.0-alpha.7", - "vue-tsc": "^1.0.9", - "webpack": "^5.69.0" - }, - "eslintConfig": { - "root": true, - "env": { - "node": true - }, - "extends": [ - "plugin:vue/vue3-essential", - "eslint:recommended", - "@vue/typescript/recommended", - "@vue/prettier", - "@vue/prettier/@typescript-eslint" - ], - "parserOptions": { - "ecmaVersion": 2020 - }, - "rules": { - "vue/no-unused-components": "off", - "no-debugger": "off" - } - }, - "engines": { - "node": ">= 16.0.0", - "pnpm": ">= 7.0.0" - }, - "lint-staged": { - "*.md": "prettier --write", - "*.{ts,tsx,js,vue,scss}": "prettier --write" + "sass": "^1.50.0" }, "repository": { "type": "git", diff --git a/publish/nutui/CHANGELOG.md b/publish/nutui/CHANGELOG.md index a6ff390690..457d1ad55b 100644 --- a/publish/nutui/CHANGELOG.md +++ b/publish/nutui/CHANGELOG.md @@ -1,3 +1,23 @@ +## v3.3.2 + +`2022-1-4` + +小程序版本依赖 Taro ^3.5.6 + +NutUI 非常感谢您对开源事业做出的贡献!🌷🌷🌷 +本次社区贡献者 @gyt95 @zy-hub @HuziG + + +* :zap: chore: vite工具按需加载功能修复(测试 Button 组件减少193kb) @richard1015 +* :zap: feat(tabs): 支持点击时自动居中功能 @gyt95 +* :zap: feat(menu): taro 环境新增 open、close方法 (#1985) @yangjinjun3 +* :zap: feat(popup): popup增加自定义遮罩层类名及样式 (#1962) @zy-hub +* :bug: fix(price): add new props strike-through (#1934)(#1907) @Drjingfubo +* :bug: fix(tabbar): router jump problem (#1993) @Drjingfubo +* :bug: fix(barrage): 小程序不展示问题处理 (#1987) @Ymm0008 +* 📖 docs(uploader): 组件的文档补充 (#1949) @HuziG + + ## v3.3.1 `2022-12-16` diff --git a/publish/nutui/README.md b/publish/nutui/README.md index 28dcf09c0a..5bea421e73 100644 --- a/publish/nutui/README.md +++ b/publish/nutui/README.md @@ -83,12 +83,12 @@ npm i @nutui/nutui@2 ```bash // Vue3 H5 项目 -npm i @nutui/nutui +npm i @nutui/nutui@3 ``` ```bash // Vue3 小程序项目 -npm i @nutui/nutui-taro +npm i @nutui/nutui-taro@3 ``` ## 示例 diff --git a/publish/nutui/package.json b/publish/nutui/package.json index c2245cb04e..025101edcb 100644 --- a/publish/nutui/package.json +++ b/publish/nutui/package.json @@ -1,15 +1,15 @@ { "name": "@nutui/nutui", "version": "3.3.2", - "description": "京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)", + "description": "京东风格的轻量级移动端 Vue2、Vue3 组件库", "main": "dist/nutui.umd.cjs", "module": "dist/nutui.es.js", "style": "dist/style.css", - "type": "module", "typings": "dist/types/index.d.ts", "sideEffects": [ - "dist/packages/_es/*", - "dist/packages/**/style*" + "dist/packages/**/*", + "dist/styles/**", + "dist/style.css" ], "vetur": { "tags": "dist/smartips/tags.json", @@ -37,7 +37,8 @@ "registry": "https://registry.npmjs.org/" }, "scripts": { - "publish:beta": "npm publish --tag=beta" + "publish:beta": "npm publish --tag=beta", + "publish-release": "npm publish --tag=latest-v3" }, "standard-version": { "scripts": { @@ -45,93 +46,8 @@ } }, "dependencies": { - "@nutui/icons-vue": "0.0.19", "sass": "^1.50.0", - "vscode": "^1.1.37", - "vue-router": "^4.0.12" - }, - "devDependencies": { - "@commitlint/cli": "^10.0.0", - "@commitlint/config-conventional": "^10.0.0", - "@tarojs/cli": "3.5.6", - "@tarojs/mini-runner": "3.5.6", - "@tarojs/plugin-framework-vue3": "3.5.6", - "@tarojs/plugin-html": "3.5.6", - "@tarojs/plugin-platform-weapp": "3.5.6", - "@tarojs/runtime": "3.5.6", - "@tarojs/taro": "3.5.6", - "@tarojs/webpack5-runner": "3.5.6", - "@types/jest": "^26.0.22", - "@types/node": "^17.0.16", - "@typescript-eslint/eslint-plugin": "^4.20.0", - "@typescript-eslint/parser": "^4.20.0", - "@vitejs/plugin-vue": "^4.0.0", - "@vue/compiler-dom": "^3.2.45", - "@vue/compiler-sfc": "^3.2.45", - "@vue/eslint-config-prettier": "^6.0.0", - "@vue/eslint-config-typescript": "^7.0.0", - "@vue/test-utils": "^2.0.0-rc.18", - "autoprefixer": "^10.3.4", - "axios": "^0.21.0", - "babel-preset-taro": "3.5.6", - "canvas": "^2.9.0", - "codesandbox": "^2.2.3", - "eslint": "^7.23.2", - "eslint-config-taro": "3.5.6", - "eslint-plugin-prettier": "^3.3.1", - "eslint-plugin-vue": "^7.8.0", - "eslint-visitor-keys": "2", - "fs-extra": "^9.1.0", - "highlight.js": "^10.3.1", - "husky": "^6.0.0", - "inquirer": "^8.2.0", - "jest": "^26.6.3", - "lint-staged": "^10.5.0", - "lzutf8": "0.6.0", - "markdown-it": "^13.0.1", - "markdown-it-container": "^3.0.0", - "prettier": "^2.0.0", - "remark-codesandbox": "^0.10.1", - "rollup-plugin-visualizer": "^5.8.3", - "standard-version": "^9.3.0", - "swiper": "6.5.1", - "transliteration": "^2.2.0", - "ts-jest": "^26.5.5", - "typescript": "^4.9.3", - "vite": "^4.0.0", - "vite-plugin-md": "^0.21.5", - "vue": "^3.2.24", - "vue-jest": "^5.0.0-alpha.7", - "vue-tsc": "^1.0.9", - "webpack": "^5.69.0" - }, - "eslintConfig": { - "root": true, - "env": { - "node": true - }, - "extends": [ - "plugin:vue/vue3-essential", - "eslint:recommended", - "@vue/typescript/recommended", - "@vue/prettier", - "@vue/prettier/@typescript-eslint" - ], - "parserOptions": { - "ecmaVersion": 2020 - }, - "rules": { - "vue/no-unused-components": "off", - "no-debugger": "off" - } - }, - "engines": { - "node": ">= 16.0.0", - "pnpm": ">= 7.0.0" - }, - "lint-staged": { - "*.md": "prettier --write", - "*.{ts,tsx,js,vue,scss}": "prettier --write" + "consola": "2.15.3" }, "repository": { "type": "git",