Skip to content

Commit 1900312

Browse files
authored
docs: use vitepress instead of vuepress (#54)
* chore: use vitepress instead of vuepress * chore: format * chore: fix lint config
1 parent 1712999 commit 1900312

File tree

12 files changed

+77
-46
lines changed

12 files changed

+77
-46
lines changed

.eslintignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
/index.*
55
/test.*
66

7-
!.vuepress
8-
/docs/.vuepress/dist
7+
!.vitepress
8+
/docs/.vitepress/dist
9+
/docs/.vitepress/cache

.github/workflows/GHPages.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ jobs:
3131
- name: Install Packages
3232
run: npm install
3333
- name: Build docs
34-
run: |+
35-
export NODE_OPTIONS=--openssl-legacy-provider
36-
npm run docs:build
34+
run: npm run docs:build
3735
- name: Setup Pages
3836
uses: actions/configure-pages@v3
3937
- name: Upload artifact
4038
uses: actions/upload-pages-artifact@v1
4139
with:
42-
path: ./docs/.vuepress/dist
40+
path: ./docs/.vitepress/dist/eslint-utils
4341
- name: Deploy to GitHub Pages
4442
id: deployment
4543
uses: actions/deploy-pages@v1

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/.nyc_output
22
/coverage
3-
/docs/.vuepress/dist
3+
/docs/.vitepress/dist
4+
/docs/.vitepress/cache
45
/node_modules
56
/index.*
67
/test.*

docs/.vitepress/.eslintrc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
parserOptions: {
3+
sourceType: "module",
4+
},
5+
overrides: [{ files: ["./config.js"], env: { node: true } }],
6+
}

docs/.vitepress/config.js

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
const { defineConfig } = require("vitepress")
2+
const path = require("path")
3+
4+
module.exports = defineConfig({
5+
title: "eslint-utils",
6+
base: "/eslint-utils/",
7+
description: "Utilities for ESLint plugins and custom rules.",
8+
head: [["link", { rel: "icon", href: "/favicon.png" }]],
9+
10+
outDir: path.resolve(__dirname, "./dist/eslint-utils"),
11+
12+
lastUpdated: true,
13+
themeConfig: {
14+
editLink: {
15+
pattern:
16+
"https://github.com/eslint-community/eslint-utils/edit/main/docs/:path",
17+
},
18+
socialLinks: [
19+
{
20+
icon: "github",
21+
link: "https://github.com/eslint-community/eslint-utils",
22+
},
23+
],
24+
25+
sidebar: [
26+
{
27+
text: "Guide",
28+
items: [{ text: "Getting Started", link: "/" }],
29+
},
30+
{
31+
text: "API Reference",
32+
items: [
33+
{ text: "AST utilities", link: "/api/ast-utils" },
34+
{
35+
text: "Scope analysis utilities",
36+
link: "/api/scope-utils",
37+
},
38+
{ text: "Token utilities", link: "/api/token-utils" },
39+
],
40+
},
41+
],
42+
},
43+
})

docs/.vitepress/theme/index.mjs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import DefaultTheme from "vitepress/theme"
2+
import "./style.css"
3+
/** @type {import('vitepress').Theme} */
4+
const theme = {
5+
...DefaultTheme,
6+
}
7+
export default theme

docs/.vitepress/theme/style.css

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:root {
2+
--vp-c-brand: #4b32c3;
3+
--vp-c-brand-light: #8080f2;
4+
--vp-c-brand-lighter: #a0a0f5;
5+
--vp-c-brand-dark: #341bab;
6+
--vp-c-brand-darker: #341bab;
7+
}
8+
9+
a > img {
10+
display: inline-block;
11+
}

docs/.vuepress/config.js

-35
This file was deleted.

docs/.vuepress/public/.nojekyll

Whitespace-only changes.

docs/.vuepress/styles/palette.styl

-1
This file was deleted.
File renamed without changes.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"build": "rollup -c",
3434
"clean": "rimraf .nyc_output coverage index.*",
3535
"coverage": "opener ./coverage/lcov-report/index.html",
36-
"docs:build": "vuepress build docs",
37-
"docs:watch": "vuepress dev docs",
36+
"docs:build": "vitepress build docs",
37+
"docs:watch": "vitepress dev docs",
3838
"format": "npm run -s format:prettier -- --write",
3939
"format:prettier": "prettier .",
4040
"format:check": "npm run -s format:prettier -- --check",
@@ -64,7 +64,7 @@
6464
"rollup": "^2.79.1",
6565
"rollup-plugin-sourcemaps": "^0.6.3",
6666
"semver": "^7.3.8",
67-
"vuepress": "^1.9.7",
67+
"vitepress": "^1.0.0-alpha.40",
6868
"warun": "^1.0.0"
6969
},
7070
"peerDependencies": {

0 commit comments

Comments
 (0)