Skip to content

Commit 972c100

Browse files
committed
build: set up sort-package-json
1 parent 27f8644 commit 972c100

File tree

3 files changed

+110
-42
lines changed

3 files changed

+110
-42
lines changed

Diff for: docs/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"dev": "vitepress dev",
76
"build": "vitepress build",
8-
"preview": "vitepress preview",
7+
"dev": "vitepress dev",
98
"lunaria:build": "lunaria build",
10-
"lunaria:open": "open-cli .vitepress/dist/_translations/index.html"
9+
"lunaria:open": "open-cli .vitepress/dist/_translations/index.html",
10+
"preview": "vitepress preview"
1111
},
1212
"devDependencies": {
1313
"@lunariajs/core": "^0.0.32",

Diff for: package.json

+39-39
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "vitepress",
33
"version": "1.1.0",
44
"description": "Vite & Vue powered static site generator",
5+
"keywords": [
6+
"vite",
7+
"vue",
8+
"vitepress"
9+
],
10+
"homepage": "https://github.com/vuejs/vitepress/tree/main/#readme",
11+
"bugs": {
12+
"url": "https://github.com/vuejs/vitepress/issues"
13+
},
14+
"repository": {
15+
"type": "git",
16+
"url": "git+https://github.com/vuejs/vitepress.git"
17+
},
18+
"license": "MIT",
19+
"author": "Evan You",
520
"type": "module",
6-
"packageManager": "[email protected]",
7-
"main": "dist/node/index.js",
8-
"types": "types/index.d.ts",
921
"exports": {
1022
".": {
1123
"types": "./types/index.d.ts",
@@ -29,6 +41,8 @@
2941
"default": "./lib/vue-demi.mjs"
3042
}
3143
},
44+
"main": "dist/node/index.js",
45+
"types": "types/index.d.ts",
3246
"bin": {
3347
"vitepress": "bin/vitepress.js"
3448
},
@@ -42,21 +56,6 @@
4256
"theme-without-fonts.d.ts",
4357
"lib"
4458
],
45-
"repository": {
46-
"type": "git",
47-
"url": "git+https://github.com/vuejs/vitepress.git"
48-
},
49-
"keywords": [
50-
"vite",
51-
"vue",
52-
"vitepress"
53-
],
54-
"author": "Evan You",
55-
"license": "MIT",
56-
"homepage": "https://github.com/vuejs/vitepress/tree/main/#readme",
57-
"bugs": {
58-
"url": "https://github.com/vuejs/vitepress/issues"
59-
},
6059
"scripts": {
6160
"dev": "rimraf dist && run-s dev:shared dev:start",
6261
"dev:start": "run-p dev:client dev:node dev:watch",
@@ -95,6 +94,13 @@
9594
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
9695
"release": "node scripts/release.js"
9796
},
97+
"simple-git-hooks": {
98+
"pre-commit": "pnpm lint-staged"
99+
},
100+
"lint-staged": {
101+
"*": "prettier --write --ignore-unknown",
102+
"package.json": "sort-package-json"
103+
},
98104
"dependencies": {
99105
"@docsearch/css": "^3.6.0",
100106
"@docsearch/js": "^3.6.0",
@@ -112,18 +118,6 @@
112118
"vite": "^5.2.8",
113119
"vue": "^3.4.21"
114120
},
115-
"peerDependencies": {
116-
"markdown-it-mathjax3": "^4",
117-
"postcss": "^8"
118-
},
119-
"peerDependenciesMeta": {
120-
"markdown-it-mathjax3": {
121-
"optional": true
122-
},
123-
"postcss": {
124-
"optional": true
125-
}
126-
},
127121
"devDependencies": {
128122
"@clack/prompts": "^0.7.0",
129123
"@mdit-vue/plugin-component": "2.0.0",
@@ -197,30 +191,36 @@
197191
"simple-git-hooks": "^2.11.1",
198192
"sirv": "^2.0.4",
199193
"sitemap": "^7.1.1",
194+
"sort-package-json": "^2.10.0",
200195
"supports-color": "^9.4.0",
201196
"typescript": "^5.4.4",
202197
"vitest": "^1.4.0",
203198
"vue-tsc": "^2.0.11",
204199
"wait-on": "^7.2.0"
205200
},
206-
"simple-git-hooks": {
207-
"pre-commit": "pnpm lint-staged"
201+
"peerDependencies": {
202+
"markdown-it-mathjax3": "^4",
203+
"postcss": "^8"
208204
},
209-
"lint-staged": {
210-
"*": [
211-
"prettier --write --ignore-unknown"
212-
]
205+
"peerDependenciesMeta": {
206+
"markdown-it-mathjax3": {
207+
"optional": true
208+
},
209+
"postcss": {
210+
"optional": true
211+
}
213212
},
213+
"packageManager": "[email protected]",
214214
"pnpm": {
215-
"overrides": {
216-
"ora>string-width": "^5"
217-
},
218215
"peerDependencyRules": {
219216
"ignoreMissing": [
220217
"@algolia/client-search",
221218
"search-insights",
222219
"postcss"
223220
]
221+
},
222+
"overrides": {
223+
"ora>string-width": "^5"
224224
}
225225
}
226226
}

Diff for: pnpm-lock.yaml

+68
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)