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/.versionrc b/.versionrc
new file mode 100644
index 00000000..d2e3b3dc
--- /dev/null
+++ b/.versionrc
@@ -0,0 +1,64 @@
+{
+ "header": "# 更新日志 \n\n",
+ "types": [{
+ "type": "feat",
+ "section": "✨ Features | 新功能",
+ "hidden": false
+ },
+ {
+ "type": "fix",
+ "section": "🐛 Bug Fixes | Bug 修复",
+ "hidden": false
+ },
+ {
+ "type": "init",
+ "section": "🎉 Init | 初始化",
+ "hidden": true
+ },
+ {
+ "type": "docs",
+ "section": "✏️ Documentation | 文档",
+ "hidden": true
+ },
+ {
+ "type": "style",
+ "section": "💄 Styles | 风格",
+ "hidden": true
+ },
+ {
+ "type": "refactor",
+ "section": "♻️ Code Refactoring | 代码重构",
+ "hidden": true
+ },
+ {
+ "type": "perf",
+ "section": "⚡ Performance Improvements | 性能优化",
+ "hidden": true
+ },
+ {
+ "type": "test",
+ "section": "✅ Tests | 测试",
+ "hidden": true
+ },
+ {
+ "type": "revert",
+ "section": "⏪ Revert | 回退",
+ "hidden": true
+ },
+ {
+ "type": "build",
+ "section": "📦 Build System | 打包构建",
+ "hidden": true
+ },
+ {
+ "type": "chore",
+ "section": "🚀 Chore | 构建/工程依赖/工具",
+ "hidden": true
+ },
+ {
+ "type": "ci",
+ "section": "👷 Continuous Integration | CI 配置",
+ "hidden": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/algolia.json b/algolia.json
deleted file mode 100644
index b8f46ea5..00000000
--- a/algolia.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "index_name": "wot-design-uni",
- "start_urls": ["https://wot-design-uni.netlify.app/"],
- "selectors": {
- "lvl0": {
- "selector": "",
- "defaultValue": "Documentation"
- },
- "lvl1": ".content h1",
- "lvl2": ".content h2",
- "lvl3": ".content h3",
- "lvl4": ".content h4",
- "lvl5": ".content h5",
- "content": ".content p, .content li"
- }
-}
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..79c43215
--- /dev/null
+++ b/build/release.js
@@ -0,0 +1,80 @@
+/*
+ * @Author: weisheng
+ * @Date: 2022-11-01 17:12:57
+ * @LastEditTime: 2023-08-02 18:35:01
+ * @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 build/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变量以及组件的样式自定义. + +## 📱 预览 + +手机扫描上的二维码访问演示: + + + +
+
+
+