Skip to content

Commit 323c442

Browse files
committed
feat: 完善pkg.json相关信息、忽略文件添加
1 parent 5df54f5 commit 323c442

File tree

7 files changed

+61
-4
lines changed

7 files changed

+61
-4
lines changed

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# @see: http://editorconfig.org
2+
3+
root = true
4+
5+
[*] # 表示所有文件适用
6+
charset = utf-8 # 设置文件字符集为 utf-8
7+
end_of_line = lf # 控制换行类型(lf | cr | crlf)
8+
insert_final_newline = true # 始终在文件末尾插入一个新行
9+
indent_style = space # 缩进风格(tab | space)
10+
indent_size = 2 # 缩进大小
11+
max_line_length = 100 # 最大行长度
12+
13+
[*.md] # 表示仅 md 文件适用以下规则
14+
insert_final_newline = false # 关闭末尾新行插入
15+
max_line_length = off # 关闭最大行长度限制
16+
trim_trailing_whitespace = false # 关闭末尾空格修剪

.node-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.18.2

.npmrc

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
registry = "https://registry.npmmirror.com"
2+
# 强制检查 engines 字段中指定的版本要求
23
engine-strict=true
4+
# 自动安装 peerDependencies 中的依赖
35
auto-install-peers=true
6+
# 不严格检查 peerDependencies 的版本要求
47
strict-peer-dependencies=false
5-
shamefully-hoist=true
8+
# 将依赖提升到根目录的 node_modules,以解决幽灵依赖问题
9+
shamefully-hoist=true

.prettierignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
dist
2+
.local
3+
.output.js
4+
node_modules
5+
.nvmrc
6+
.output
7+
8+
9+
**/*.svg
10+
**/*.sh
11+
12+
public
13+
.npmrc
14+
*-lock.yaml

.stylelintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist
2+
public
3+
__tests__

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 组件库模板
22

3-
这是一个基于 Turborepo + Vue 3 + TypeScript 的现代化组件库模板,采用 Monorepo 架构来管理多个包,涵盖了 ESLint、Prettier、Stylelint、Commitlint + Husky + Lint-Staged 和 TypeScript 的项目规范配置。此模板提供了一套完整的开发环境,旨在让开发者能够专注于组件的开发,而无需担心底层配置的复杂性。
3+
这是一个基于 `Turborepo + Vue 3 + TypeScript` 的现代化组件库模板,采用 Monorepo 架构来管理多个包,涵盖了 ESLint、Prettier、Stylelint、Commitlint + Husky + Lint-Staged 和 TypeScript 的项目规范配置。此模板提供了一套完整的开发环境,旨在让开发者能够专注于组件的开发,而无需担心底层配置的复杂性。
44

55
## 📦 项目结构
66

package.json

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
{
22
"name": "vue3-component-lib",
3+
"description": "This is a modern component library template based on Turborepo+Vue 3+TypeScript.",
34
"version": "1.0.0",
45
"private": true,
6+
"packageManager": "pnpm@9.12.3",
7+
"author": "huangmingfu <212149997@qq.com>",
8+
"license": "MIT",
9+
"homepage": "https://github.com/huangmingfu/vue3-turbo-component-lib-template",
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/huangmingfu/vue3-turbo-component-lib-template"
13+
},
14+
"bugs": "https://github.com/huangmingfu/vue3-turbo-component-lib-template/issues",
15+
"keywords": [
16+
"component-template",
17+
"component-lib",
18+
"turborepo",
19+
"monorepo",
20+
"vue3",
21+
"vite5",
22+
"turbo"
23+
],
524
"scripts": {
625
"dev": "turbo run dev",
726
"dev:docs": "pnpm -F @vue3-lib/docs run dev",
@@ -31,8 +50,8 @@
3150
"stylelint-config-standard-scss": "^10.0.0",
3251
"stylelint-config-recommended-vue": "^1.5.0"
3352
},
34-
"packageManager": "pnpm@9.12.3",
3553
"engines": {
36-
"node": ">=18.0.0"
54+
"node": ">=18",
55+
"pnpm": ">=9"
3756
}
3857
}

0 commit comments

Comments
 (0)