diff --git a/.eslintrc.js b/.eslintrc.js
index 18907349..584cd6e0 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -4,7 +4,7 @@
* @LastEditTime: 2023-03-28 16:52:32
* @LastEditors: weisheng
* @Description:
- * @FilePath: \fant-mini-plus\.eslintrc.js
+ * @FilePath: \wot-design-uni\.eslintrc.js
* 记得注释
*/
module.exports = {
diff --git a/build/changelog.js b/build/changelog.js
new file mode 100644
index 00000000..7ef9191e
--- /dev/null
+++ b/build/changelog.js
@@ -0,0 +1,22 @@
+/*
+ * @Author: weisheng
+ * @Date: 2022-02-24 15:37:04
+ * @LastEditTime: 2023-08-02 17:52:00
+ * @LastEditors: weisheng
+ * @Description: 讲生成的changelog移动到文档和组件中
+ * @FilePath: \wot-design-uni\build\changelog.js
+ * 记得注释
+ */
+const fs = require('fs')
+const path = require('path')
+const fromPath = path.resolve(__dirname, '../CHANGELOG.md')
+const toPath = path.resolve(__dirname, '../src/uni_modules/wot-design-uni')
+const docPath = path.resolve(__dirname, '../docs/guide')
+
+try {
+ const file = fs.readFileSync(fromPath, 'utf-8')
+ fs.writeFileSync(`${toPath}/changelog.md`, file)
+ fs.writeFileSync(`${docPath}/changelog.md`, file)
+} catch (error) {
+ console.log('CHANGELOG 获取失败')
+}
diff --git a/build/release.js b/build/release.js
new file mode 100644
index 00000000..f0462095
--- /dev/null
+++ b/build/release.js
@@ -0,0 +1,80 @@
+/*
+ * @Author: weisheng
+ * @Date: 2022-11-01 17:12:57
+ * @LastEditTime: 2023-08-02 17:59:15
+ * @LastEditors: weisheng
+ * @Description: 组件发版问答
+ * @FilePath: \wot-design-uni\build\release.js
+ * 记得注释
+ */
+const inquirer = require('inquirer')
+// Node 核心模块
+const { execSync } = require('child_process')
+const { writeFileSync, readFileSync } = require('fs')
+const path = require('path')
+const src = path.resolve(__dirname, '../src/uni_modules/wot-design-uni')
+const oldVersion = require('../package.json').version
+inquirer
+ .prompt([
+ {
+ type: 'list',
+ name: 'version',
+ message: '请选择发版类型(默认值:✨ minor)',
+ choices: ['🐛 patch 小版本', '✨ minor 中版本', '🚀 major 大版本'],
+ default: '✨ minor 中版本'
+ },
+ {
+ type: 'list',
+ name: 'release',
+ message: '确认发布?',
+ choices: ['Y', 'N'],
+ default: 'Y'
+ }
+ ])
+ .then((answers) => {
+ if (!answers['release'] || answers['release'].toLowerCase() != 'y') {
+ console.log('🚨 操作取消')
+ return
+ }
+ // 项目版本更新
+ switch (answers['version']) {
+ case '🐛 patch 小版本':
+ execSync('yarn release-patch')
+ break
+ case '✨ minor 中版本':
+ execSync('yarn release-minor')
+ break
+ case '🚀 major 大版本':
+ execSync('yarn release-major')
+ break
+ default:
+ execSync('yarn release-minor')
+ break
+ }
+ // 生成日志
+ execSync('node ./changelog.js')
+ // 更新版本
+ const file = readFileSync(path.resolve(__dirname, '../package.json'))
+ const packageJson = JSON.parse(file.toString())
+ const version = packageJson.version
+ console.log(`√ bumping version in package.json from ${oldVersion} to ${version}`)
+ const package = require('../src/uni_modules/wot-design-uni/package.json')
+ package.version = version
+ writeFileSync(path.resolve(src, 'package.json'), JSON.stringify(package))
+ execSync('yarn lint')
+ execSync('git add -A ')
+ execSync(`git commit -am "build: compile ${version}"`)
+ execSync(`git tag -a v${version} -am "chore(release): ${version}"`)
+ console.log('√ committing changes')
+ const branch = execSync('git branch --show-current').toString().replace(/\*/g, '').replace(/ /g, '')
+ console.log('🎉 版本发布成功')
+ const tip = 'Run `git push --follow-tags origin ' + branch + '` ' + 'to publish'
+ console.log(tip.replace(/\n/g, ''))
+ })
+ .catch((error) => {
+ if (error.isTtyError) {
+ // Prompt couldn't be rendered in the current environment
+ } else {
+ // Something else went wrong
+ }
+ })
diff --git a/commitlint.config.js b/commitlint.config.js
index 0367d83f..c023cdf2 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -4,7 +4,7 @@
* @LastEditTime: 2023-03-25 18:12:52
* @LastEditors: weisheng
* @Description:
- * @FilePath: \fant-mini-plus\commitlint.config.js
+ * @FilePath: \wot-design-uni\commitlint.config.js
* 记得注释
*/
module.exports = {
diff --git a/package.json b/package.json
index 68ddf966..1436e404 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wot-design-uni",
- "version": "0.0.1",
+ "version": "0.0.0",
"scripts": {
"dev:app": "uni -p app",
"dev:app-android": "uni -p app-android",
@@ -44,7 +44,7 @@
"release-major": "standard-version --release-as major",
"release-minor": "standard-version --release-as minor",
"release-patch": "standard-version --release-as patch",
- "clean:lib": "rimraf lib",
+ "release-tag": "node build/release.js",
"upload:mp-weixin": "uni build -p mp-weixin && minici --platform weixin",
"upload:mp-alipay": "uni build -p mp-alipay && minici --platform alipay",
"upload:mp-dingtalk": "uni build -p mp-dingtalk && minici --platform dd"
diff --git a/src/env.d.ts b/src/env.d.ts
index da88959b..81131e0a 100644
--- a/src/env.d.ts
+++ b/src/env.d.ts
@@ -4,7 +4,7 @@
* @LastEditTime: 2023-03-21 21:07:02
* @LastEditors: weisheng
* @Description:
- * @FilePath: \fant-mini-plus\src\env.d.ts
+ * @FilePath: \wot-design-uni\src\env.d.ts
* 记得注释
*/
///
+
+
📱 一个参照Wot-design,基于 Vue3 打造的uni-app组件库
+ +
+
+
+
+
+ 🔥 文档网站 (Netlify) +
+ + +## ✨ 特性 + +- 🚀 支持 APP、H5、微信小程序、支付宝小程序、钉钉小程序 等平台. +- 🚀 50+ 个高质量组件,覆盖移动端主流场景. +- 💪 使用 Typescript 构建,提供良好的组件类型系统. +- 💪 采用 Vue3 最新特性,提升组件性能. +- 📖 提供丰富的文档和组件示例. +- 🎨 支持主题定制,可以定制scss变量以及组件的样式自定义. + +## 📱 预览 + +手机扫描上的二维码访问演示: + + + +
+
+
+