Skip to content

Commit

Permalink
release: v3.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
richard1015 committed Jan 4, 2023
1 parent 3766a2d commit 69b499a
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 248 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

## 示例
Expand Down
4 changes: 2 additions & 2 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
60 changes: 13 additions & 47 deletions jd/generate-entry-es.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(',')}];
Expand Down Expand Up @@ -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);
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
20 changes: 20 additions & 0 deletions publish/nutui-taro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
4 changes: 2 additions & 2 deletions publish/nutui-taro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

## 示例
Expand Down
101 changes: 3 additions & 98 deletions publish/nutui-taro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down
20 changes: 20 additions & 0 deletions publish/nutui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
4 changes: 2 additions & 2 deletions publish/nutui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

## 示例
Expand Down
Loading

0 comments on commit 69b499a

Please sign in to comment.