format everything

This commit is contained in:
Evan Simkowitz
2024-09-12 17:12:02 -07:00
parent 0f72c50f48
commit 9471355300
18 changed files with 305 additions and 305 deletions
+43 -43
View File
@@ -1,55 +1,55 @@
name: Deploy to GitHub Pages
env:
NODE_VERSION: 22
NODE_VERSION: 22
on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
workflow_dispatch:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
workflow_dispatch:
jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install yarn
run: corepack enable && yarn install
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install yarn
run: corepack enable && yarn install
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
deploy:
name: Deploy to GitHub Pages
needs: build
deploy:
name: Deploy to GitHub Pages
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
+22 -22
View File
@@ -1,29 +1,29 @@
name: Test deployment
env:
NODE_VERSION: 22
NODE_VERSION: 22
on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install yarn
run: corepack enable && yarn install
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test build website
run: yarn build
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
- name: Install yarn
run: corepack enable && yarn install
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test build website
run: yarn build
+1 -1
View File
@@ -2,4 +2,4 @@ build
.git
node_modules
*.min.*
*.mdx
*.mdx
+6 -6
View File
@@ -1,8 +1,8 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx",
"unifiedjs.vscode-remark"
]
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx",
"unifiedjs.vscode-remark"
]
}
+38 -38
View File
@@ -1,40 +1,40 @@
{
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.formatOnPaste": true,
"editor.tabSize": 4,
"editor.insertSpaces": false,
"prettier.useEditorConfig": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.insertSpaces": true,
"editor.autoIndent": "keep"
},
"[markdown]": {
"editor.defaultFormatter": "unifiedjs.vscode-remark"
}
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.formatOnPaste": true,
"editor.tabSize": 4,
"editor.insertSpaces": false,
"prettier.useEditorConfig": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.insertSpaces": true,
"editor.autoIndent": "keep"
},
"[markdown]": {
"editor.defaultFormatter": "unifiedjs.vscode-remark"
}
}
+1 -1
View File
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
+6 -6
View File
@@ -1,8 +1,8 @@
{
"label": "Tutorial - Basics",
"position": 2,
"link": {
"type": "generated-index",
"description": "5 minutes to learn the most important Docusaurus concepts."
}
"label": "Tutorial - Basics",
"position": 2,
"link": {
"type": "generated-index",
"description": "5 minutes to learn the most important Docusaurus concepts."
}
}
+7 -7
View File
@@ -14,10 +14,10 @@ Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://
## What's next?
- Read the [official documentation](https://docusaurus.io/)
- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
- Add a [search bar](https://docusaurus.io/docs/search)
- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)
* Read the [official documentation](https://docusaurus.io/)
* Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
* Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
* Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
* Add a [search bar](https://docusaurus.io/docs/search)
* Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
* Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)
+3 -3
View File
@@ -6,9 +6,9 @@ sidebar_position: 2
Documents are **groups of pages** connected through:
- a **sidebar**
- **previous/next navigation**
- **versioning**
* a **sidebar**
* **previous/next navigation**
* **versioning**
## Create your first Doc
+3 -3
View File
@@ -6,9 +6,9 @@ sidebar_position: 1
Add **Markdown or React** files to `src/pages` to create a **standalone page**:
- `src/pages/index.js``localhost:3000/`
- `src/pages/foo.md``localhost:3000/foo`
- `src/pages/foo/bar.js``localhost:3000/foo/bar`
* `src/pages/index.js``localhost:3000/`
* `src/pages/foo.md``localhost:3000/foo`
* `src/pages/foo/bar.js``localhost:3000/foo/bar`
## Create your first React Page
+5 -5
View File
@@ -1,7 +1,7 @@
{
"label": "Tutorial - Extras",
"position": 3,
"link": {
"type": "generated-index"
}
"label": "Tutorial - Extras",
"position": 3,
"link": {
"type": "generated-index"
}
}
+4 -4
View File
@@ -18,8 +18,8 @@ The `docs` folder is copied into `versioned_docs/version-1.0` and `versions.json
Your docs now have 2 versions:
- `1.0` at `http://localhost:3000/docs/` for the version 1.0 docs
- `current` at `http://localhost:3000/docs/next/` for the **upcoming, unreleased docs**
* `1.0` at `http://localhost:3000/docs/` for the version 1.0 docs
* `current` at `http://localhost:3000/docs/next/` for the **upcoming, unreleased docs**
## Add a Version Dropdown
@@ -51,5 +51,5 @@ The docs version dropdown appears in your navbar:
It is possible to edit versioned docs in their respective folder:
- `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello`
- `docs/hello.md` updates `http://localhost:3000/docs/next/hello`
* `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello`
* `docs/hello.md` updates `http://localhost:3000/docs/next/hello`
+70 -70
View File
@@ -1,85 +1,85 @@
import type { Config } from "@docusaurus/types";
const config: Config = {
title: "Wave Terminal Documentation",
tagline: "Wavy Wavy Wavy",
favicon: "img/logo/wave-logo_appicon.svg",
title: "Wave Terminal Documentation",
tagline: "Wavy Wavy Wavy",
favicon: "img/logo/wave-logo_appicon.svg",
// Set the production url of your site here
url: "https://wavetermdev.github.io/",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/waveterm-docs-new/",
// Set the production url of your site here
url: "https://wavetermdev.github.io/",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/waveterm-docs-new/",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "wavetermdev", // Usually your GitHub org/user name.
projectName: "waveterm-docs-new", // Usually your repo name.
deploymentBranch: "main",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "wavetermdev", // Usually your GitHub org/user name.
projectName: "waveterm-docs-new", // Usually your repo name.
deploymentBranch: "main",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
trailingSlash: false,
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
trailingSlash: false,
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"],
},
plugins: [
[
"content-docs",
{
path: "docs",
routeBasePath: "/",
} as import("@docusaurus/plugin-content-docs").Options,
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"],
},
plugins: [
[
"content-docs",
{
path: "docs",
routeBasePath: "/",
} as import("@docusaurus/plugin-content-docs").Options,
],
],
],
themes: ["classic"],
themeConfig: {
docs: {
sidebar: {
hideable: false,
autoCollapseCategories: false,
},
},
colorMode: {
defaultMode: "light",
disableSwitch: false,
respectPrefersColorScheme: true,
},
navbar: {
logo: {
src: "img/logo/wave-light.png",
srcDark: "img/logo/wave-dark.png",
href: "https://waveterm.dev/",
},
hideOnScroll: true,
items: [
{
type: "docsVersionDropdown",
position: "right",
themes: ["classic"],
themeConfig: {
docs: {
sidebar: {
hideable: false,
autoCollapseCategories: false,
},
},
{
type: "localeDropdown",
position: "right",
colorMode: {
defaultMode: "light",
disableSwitch: false,
respectPrefersColorScheme: true,
},
{
label: "Github",
href: "https://github.com/wavetermdev/waveterm",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
navbar: {
logo: {
src: "img/logo/wave-light.png",
srcDark: "img/logo/wave-dark.png",
href: "https://waveterm.dev/",
},
hideOnScroll: true,
items: [
{
type: "docsVersionDropdown",
position: "right",
},
{
type: "localeDropdown",
position: "right",
},
{
label: "Github",
href: "https://github.com/wavetermdev/waveterm",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
],
},
footer: {
copyright: `Copyright © ${new Date().getFullYear()} Command Line Inc. Built with Docusaurus.`,
},
],
},
footer: {
copyright: `Copyright © ${new Date().getFullYear()} Command Line Inc. Built with Docusaurus.`,
},
},
staticDirectories: ["static"],
staticDirectories: ["static"],
};
export default config;
+13 -13
View File
@@ -6,22 +6,22 @@ import * as mdx from "eslint-plugin-mdx";
import tseslint from "typescript-eslint";
const baseConfig = tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
mdx.flat,
mdx.flatCodeBlocks
eslint.configs.recommended,
...tseslint.configs.recommended,
mdx.flat,
mdx.flatCodeBlocks
);
const customConfig = {
...baseConfig,
overrides: [
{
files: ["emain/emain.ts", "electron.vite.config.ts"],
env: {
node: true,
},
},
],
...baseConfig,
overrides: [
{
files: ["emain/emain.ts", "electron.vite.config.ts"],
env: {
node: true,
},
},
],
};
export default [customConfig, eslintConfigPrettier];
+65 -65
View File
@@ -1,67 +1,67 @@
{
"name": "waveterm-docs-new",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.5.2",
"@docusaurus/plugin-content-docs": "^3.5.2",
"@docusaurus/plugin-debug": "^3.5.2",
"@docusaurus/plugin-sitemap": "^3.5.2",
"@docusaurus/theme-classic": "^3.5.2",
"@docusaurus/theme-search-algolia": "^3.5.2",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.5.2",
"@docusaurus/tsconfig": "3.5.2",
"@docusaurus/types": "3.5.2",
"@eslint/js": "^9.9.0",
"@types/eslint": "^9.6.1",
"@types/eslint-config-prettier": "^6.11.3",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-mdx": "^3.1.5",
"prettier": "^3.3.3",
"prettier-plugin-jsdoc": "^1.3.0",
"prettier-plugin-organize-imports": "^4.0.0",
"remark-cli": "^12.0.1",
"remark-frontmatter": "^5.0.0",
"remark-mdx": "^3.0.1",
"remark-preset-lint-consistent": "^6.0.0",
"remark-preset-lint-recommended": "^7.0.0",
"typescript": "^5.5.2",
"typescript-eslint": "^8.4.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
},
"packageManager": "yarn@4.4.1"
"name": "waveterm-docs-new",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.5.2",
"@docusaurus/plugin-content-docs": "^3.5.2",
"@docusaurus/plugin-debug": "^3.5.2",
"@docusaurus/plugin-sitemap": "^3.5.2",
"@docusaurus/theme-classic": "^3.5.2",
"@docusaurus/theme-search-algolia": "^3.5.2",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.5.2",
"@docusaurus/tsconfig": "3.5.2",
"@docusaurus/types": "3.5.2",
"@eslint/js": "^9.9.0",
"@types/eslint": "^9.6.1",
"@types/eslint-config-prettier": "^6.11.3",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-mdx": "^3.1.5",
"prettier": "^3.3.3",
"prettier-plugin-jsdoc": "^1.3.0",
"prettier-plugin-organize-imports": "^4.0.0",
"remark-cli": "^12.0.1",
"remark-frontmatter": "^5.0.0",
"remark-mdx": "^3.0.1",
"remark-preset-lint-consistent": "^6.0.0",
"remark-preset-lint-recommended": "^7.0.0",
"typescript": "^5.5.2",
"typescript-eslint": "^8.4.0"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=18.0"
},
"packageManager": "yarn@4.4.1"
}
+9 -9
View File
@@ -1,12 +1,12 @@
/** @type {import("prettier").Config} */
module.exports = {
plugins: ["prettier-plugin-jsdoc", "prettier-plugin-organize-imports"],
printWidth: 120,
trailingComma: "es5",
useTabs: false,
singleQuote: false,
jsdocVerticalAlignment: true,
jsdocSeparateReturnsFromParam: true,
jsdocSeparateTagGroups: true,
jsdocPreferCodeFences: true,
plugins: ["prettier-plugin-jsdoc", "prettier-plugin-organize-imports"],
printWidth: 120,
trailingComma: "es5",
useTabs: false,
singleQuote: false,
jsdocVerticalAlignment: true,
jsdocSeparateReturnsFromParam: true,
jsdocSeparateTagGroups: true,
jsdocPreferCodeFences: true,
};
+4 -4
View File
@@ -11,11 +11,11 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
Create as many sidebars as you want.
*/
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{ type: "autogenerated", dirName: "." }],
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{ type: "autogenerated", dirName: "." }],
// But you can create a sidebar manually
/*
// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
+5 -5
View File
@@ -1,7 +1,7 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
}