Skip to content

Commit 19f1d94

Browse files
committed
refactor: 更新构建流程
1 parent fc07f59 commit 19f1d94

22 files changed

+2635
-5704
lines changed

.editorconfig

-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
root = true
22

33
[*]
4-
charset = utf-8
5-
indent_style = space
64
indent_size = 2
75
end_of_line = lf
86
insert_final_newline = true
9-
trim_trailing_whitespace = true
10-
11-
[*.md]
12-
insert_final_newline = false
13-
trim_trailing_whitespace = false

.eslintignore

-14
This file was deleted.

.eslintrc.js

-41
This file was deleted.

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/ci.yml renamed to .github/workflows/doc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 发布到github pages
1+
name: 发布文档到github pages
22
on:
33
push:
44
branches:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ dist-ssr
88
types
99
coverage
1010
docs/.vitepress/cache
11+
lib

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ dist
77
pnpm-lock.yaml
88
coverage
99
.github
10+
.DS_Store

.prettierrc.js

-4
This file was deleted.

eslint.config.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { defineConfig } from '@configurajs/eslint'
2+
3+
export default defineConfig({
4+
ignores: [],
5+
rules: {
6+
curly: 'off',
7+
eqeqeq: 'warn',
8+
'vue/multi-word-component-names': 'off',
9+
'vue/no-deprecated-v-on-native-modifier': 'off',
10+
'vue/no-mutating-props': 'off',
11+
'no-unused-vars': 'off',
12+
'no-loss-of-precision': 'off',
13+
'no-undef': 'off',
14+
'no-empty': 'off',
15+
'no-func-assign': 'off',
16+
'no-prototype-builtins': 'off',
17+
'no-cond-assign': 'off',
18+
'no-debugger': 'off',
19+
'eslint-comments/no-unlimited-disable': 'off',
20+
'@typescript-eslint/ban-ts-comment': 'off',
21+
'@typescript-eslint/no-unused-vars': 'warn',
22+
'@typescript-eslint/explicit-module-boundary-types': 'off',
23+
'@typescript-eslint/no-empty-function': 'warn',
24+
'@typescript-eslint/no-explicit-any': 'off',
25+
'@typescript-eslint/no-floating-promises': 'off',
26+
},
27+
})
File renamed without changes.

package.json

+61-93
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
11
{
22
"name": "vue3-oop",
33
"version": "1.0.16",
4-
"main": "dist/vue3-oop.js",
5-
"module": "dist/vue3-oop.mjs",
6-
"types": "types/index.d.ts",
7-
"scripts": {
8-
"dev": "vite",
9-
"build": "vite build",
10-
"serve": "vite preview",
11-
"type:check": "tsc --noEmit --skipLibCheck",
12-
"lint": "eslint --fix .",
13-
"format": "prettier --write '**/*.{ts,tsx,js,vue,css,scss,html,json}'",
14-
"release": "pnpm build && release-it",
15-
"docs:dev": "vitepress dev docs",
16-
"docs:build": "vitepress build docs",
17-
"docs:serve": "vitepress serve docs",
18-
"test": "vitest",
19-
"coverage": "vitest --coverage"
4+
"packageManager": "[email protected]",
5+
"engines": {
6+
"pnpm": ">=9.0"
207
},
21-
"files": [
22-
"dist",
23-
"types",
24-
"package.json"
25-
],
8+
"description": "vue3-oop take class component and di into vue",
269
"author": {
2710
"name": "agileago",
2811
"email": "[email protected]"
@@ -40,92 +23,77 @@
4023
"type": "git",
4124
"url": "git+https://github.com/agileago/vue3-oop.git"
4225
},
43-
"homepage": "https://agileago.github.io/vue3-oop",
26+
"homepage": "https://agileago.github.io/vue3-oop#readme",
27+
"bugs": {
28+
"url": "https://github.com/agileago/vue3-oop/issues"
29+
},
4430
"license": "MIT",
45-
"devDependencies": {
46-
"@abraham/reflection": "^0.12.0",
47-
"@algolia/client-search": "^4.19.1",
48-
"@commitlint/cli": "^17.7.1",
49-
"@commitlint/config-conventional": "^17.7.0",
50-
"@release-it/conventional-changelog": "^7.0.0",
51-
"@types/lodash-es": "^4.17.8",
52-
"@types/markdown-it": "^13.0.1",
53-
"@types/node": "^20.5.7",
54-
"@types/prettier": "^3.0.0",
55-
"@typescript-eslint/eslint-plugin": "^6.5.0",
56-
"@typescript-eslint/parser": "^6.5.0",
57-
"@vitejs/plugin-vue": "^4.3.4",
58-
"@vitest/coverage-c8": "^0.33.0",
59-
"@vitest/ui": "^0.34.3",
60-
"@vue/test-utils": "2.4.1",
61-
"@vue3-oop/plugin-vue-jsx": "^1.4.6",
62-
"ant-design-vue": "^4.0.1",
63-
"autobind-decorator": "^2.4.0",
64-
"c8": "^8.0.1",
65-
"eslint": "^8.48.0",
66-
"eslint-config-prettier": "^9.0.0",
67-
"eslint-plugin-prettier": "^5.0.0",
68-
"happy-dom": "^10.11.1",
69-
"injection-js": "^2.4.0",
70-
"lint-staged": "^14.0.1",
71-
"lodash-es": "^4.17.21",
72-
"prettier": "^3.0.2",
73-
"release-it": "^16.3.0",
74-
"rimraf": "^5.0.1",
75-
"sass": "^1.66.1",
76-
"simple-git-hooks": "^2.9.0",
77-
"tslib": "^2.6.2",
78-
"typescript": "^5.2.2",
79-
"vite": "^4.4.9",
80-
"vite-plugin-dts": "^3.5.3",
81-
"vite-tsconfig-paths": "^4.2.0",
82-
"vitepress": "1.0.0-rc.10",
83-
"vitest": "^0.34.3",
84-
"vue": "^3.5.13",
85-
"vue-router": "^4.2.4"
31+
"type": "module",
32+
"exports": {
33+
".": {
34+
"types": "./dist/index.d.ts",
35+
"import": "./dist/index.js",
36+
"require": "./dist/index.cjs"
37+
}
38+
},
39+
"main": "dist/index.cjs",
40+
"module": "dist/index.js",
41+
"types": "dist/index.d.ts",
42+
"files": [
43+
"dist"
44+
],
45+
"publishConfig": {
46+
"registry": "https://registry.npmjs.org",
47+
"access": "public"
48+
},
49+
"scripts": {
50+
"build": "tsup src/index.ts --format esm,cjs --out-dir=lib --dts --clean",
51+
"dev": "tsup src/index.ts --format esm --out-dir=lib --watch --dts",
52+
"typecheck": "tsc --noEmit",
53+
"lint": "eslint --fix .",
54+
"format": "prettier --write .",
55+
"release": "",
56+
"prepublishOnly": "pnpm run build",
57+
"docs:dev": "vitepress dev docs",
58+
"docs:build": "vitepress build docs",
59+
"docs:serve": "vitepress serve docs",
60+
"test": "vitest",
61+
"postinstall": "simple-git-hooks"
8662
},
8763
"commitlint": {
8864
"extends": [
8965
"@commitlint/config-conventional"
9066
]
9167
},
9268
"simple-git-hooks": {
93-
"pre-commit": "pnpm exec lint-staged",
94-
"commit-msg": "pnpm exec commitlint -e \"$@\""
69+
"pre-commit": "enpm exec lint-staged --allow-empty --concurrent false",
70+
"commit-msg": "pnpm exec commitlint -e $1"
9571
},
9672
"lint-staged": {
97-
"*.{ts,tsx}": [
98-
"eslint --fix",
99-
"prettier --write"
100-
],
101-
"*.{css,scss,html,json,js}": [
102-
"prettier --write"
103-
]
73+
"*.{ts,tsx}": "eslint --fix",
74+
"*.{vue,ts,tsx,js,jsx,less,css}": "prettier --write"
10475
},
105-
"publishConfig": {
106-
"registry": "https://registry.npmjs.org",
107-
"access": "public"
76+
"devDependencies": {
77+
"@commitlint/cli": "^19.8.0",
78+
"@commitlint/config-conventional": "^19.8.0",
79+
"eslint": "^9.23.0",
80+
"@configurajs/eslint": "^0.1.2",
81+
"prettier": "^3.5.3",
82+
"@configurajs/prettier": "^0.1.4",
83+
"simple-git-hooks": "^2.9.0",
84+
"lint-staged": "^14.0.1",
85+
86+
"tslib": "^2.6.2",
87+
"typescript": "^5.8.2",
88+
"vue": "^3.5.13",
89+
"@abraham/reflection": "^0.12.0",
90+
"autobind-decorator": "^2.4.0",
91+
"injection-js": "^2.4.0",
92+
93+
"tsup": "^8.4.0"
10894
},
10995
"peerDependencies": {
11096
"injection-js": "*",
11197
"vue": "3"
112-
},
113-
"release-it": {
114-
"git": {
115-
"commitMessage": "chore(release): ${version}",
116-
"tagName": "v${version}"
117-
},
118-
"plugins": {
119-
"@release-it/conventional-changelog": {
120-
"preset": "angular",
121-
"infile": "CHANGELOG.md",
122-
"ignoreRecommendedBump": true
123-
}
124-
},
125-
"github": {
126-
"release": true,
127-
"web": true,
128-
"autoGenerate": true
129-
}
13098
}
13199
}

0 commit comments

Comments
 (0)