generated from Gabb-c/node-ts-lib-setup
-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #836 from Gabb-c/master
- Loading branch information
Showing
109 changed files
with
4,624 additions
and
3,935 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,4 @@ jobs: | |
run: pnpm install --frozen-lockfile | ||
|
||
- name: Build | ||
run: pnpm build | ||
run: pnpm size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,12 @@ jobs: | |
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint | ||
- name: Lint (Rome) | ||
run: pnpm lint | ||
|
||
- name: Format (Rome) | ||
run: pnpm format | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
|
@@ -56,7 +59,7 @@ jobs: | |
run: pnpm install --frozen-lockfile | ||
|
||
- name: Semantic Release | ||
uses: cycjimmy/[email protected].0 | ||
uses: cycjimmy/[email protected].2 | ||
with: | ||
extra_plugins: | | ||
@semantic-release/git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,3 +146,6 @@ lib | |
|
||
# VitePress | ||
**/.vitepress/cache | ||
|
||
# SWC | ||
.swc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
|
||
echo "Checking commit message 📝" | ||
pnpm commitlint --edit $1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
. "$(dirname "$0")/common.sh" | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
echo "Linting files 📝" | ||
pnpm lint:fix | ||
|
||
echo "Typecheck 📝" | ||
pnpm lint:tsc | ||
pnpm lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"src/**/*": ["pnpm lint:fix", "pnpm format:fix"], | ||
"pnpm-lock.yaml": ["pnpm audit"], | ||
"package.json": ["pnpm sort-package-json"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16.13.1 | ||
lts/hydrogen |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
{ | ||
"recommendations": [ | ||
"christian-kohler.path-intellisense", | ||
"dbaeumer.vscode-eslint", | ||
"editorconfig.editorconfig", | ||
"eamodio.gitlens", | ||
"EditorConfig.EditorConfig", | ||
"ms-vscode.vscode-typescript-next", | ||
"VisualStudioExptTeam.vscodeintellicode", | ||
"wix.vscode-import-cost", | ||
"xabikos.JavaScriptSnippets", | ||
"yzhang.markdown-all-in-one" | ||
"visualstudioexptteam.vscodeintellicode", | ||
"xabikos.javascriptsnippets", | ||
"ms-vscode.vscode-typescript-next", | ||
"ms-vscode.js-debug-nightly", | ||
"yzhang.markdown-all-in-one", | ||
"christian-kohler.path-intellisense", | ||
"rome.rome" | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,8 @@ | ||
{ | ||
"files.autoSave": "off", | ||
"explorer.confirmDelete": false, | ||
"explorer.confirmDragAndDrop": false, | ||
"javascript.updateImportsOnFileMove.enabled": "always", | ||
"window.zoomLevel": 0, | ||
"eslint.format.enable": true, // This is super important | ||
"editor.suggestSelection": "first", | ||
"editor.fontLigatures": true, | ||
"editor.semanticHighlighting.enabled": false, | ||
"editor.tabSize": 2, | ||
"editor.codeActionsOnSave": { // This is super important | ||
"source.fixAll.eslint": true | ||
}, | ||
"workbench.startupEditor": "newUntitledFile", | ||
"eslint.run": "onSave", // This is super important | ||
"eslint.alwaysShowStatus": true, // This is super important | ||
"eslint.codeAction.showDocumentation": { | ||
"enable": true | ||
}, | ||
"typescript.tsserver.log": "verbose", | ||
"javascript.suggest.autoImports": true, | ||
"typescript.suggest.autoImports": true, | ||
"screencastMode.onlyKeyboardShortcuts": true, | ||
"breadcrumbs.enabled": true, | ||
"editor.parameterHints.enabled": false, | ||
"eslint.packageManager": "yarn", // If you're working with npm, just change this to "eslint.packageManager": "npm" | ||
"files.associations": { | ||
".sequelizerc": "javascript", | ||
".stylelintrc": "json", | ||
".prettierrc": "json", | ||
"*.tsx": "typescriptreact" | ||
}, | ||
"files.watcherExclude": { | ||
"**/.git/objects/**": true, | ||
"**/node_modules/**": true | ||
}, | ||
"emmet.showSuggestionsAsSnippets": true, | ||
"emmet.includeLanguages": { | ||
"javascript": "javascriptreact", | ||
"typescript": "typescriptreact" | ||
"explorer.confirmDelete": false, | ||
"workbench.startupEditor": "none", | ||
"typescript.tsserver.log": "off", | ||
"editor.defaultFormatter": "rome.rome", | ||
"editor.formatOnSave": true, | ||
"explorer.confirmDragAndDrop": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,57 @@ | ||
import { defineConfig } from 'vitepress'; | ||
import { readFileSync } from 'node:fs'; | ||
import { author, license, repository, description as packageDescription } from '../../package.json'; | ||
import { navbarItems, sidebarRoutes } from './routes'; | ||
import { SOCIAL_LINKS } from './social-links'; | ||
import { headConfig } from './head-config'; | ||
import { defineConfig } from "vitepress"; | ||
import { withPwa } from "@vite-pwa/vitepress"; | ||
import { readFileSync } from "node:fs"; | ||
import { author, license, repository, description as packageDescription } from "../../package.json"; | ||
import { navbarItems, sidebarRoutes } from "./routes"; | ||
import { SOCIAL_LINKS } from "./social-links"; | ||
import { headConfig } from "./head-config"; | ||
|
||
import * as dotenv from 'dotenv'; | ||
import * as dotenv from "dotenv"; | ||
dotenv.config(); | ||
|
||
const readSvg = (path: string): string => readFileSync(require.resolve(path), 'utf-8'); | ||
const readSvg = (path: string): string => readFileSync(require.resolve(path), "utf-8"); | ||
|
||
export default defineConfig({ | ||
title: 'Pokenode-ts', | ||
description: packageDescription, | ||
lang: 'en-US', | ||
srcDir: './src', | ||
lastUpdated: true, | ||
head: headConfig, | ||
themeConfig: { | ||
nav: navbarItems, | ||
sidebar: sidebarRoutes, | ||
siteTitle: 'Pokenode-ts', | ||
logo: '/siteLogo.svg', | ||
footer: { | ||
message: `Made with ❤️<br/>Released under the ${license} License`, | ||
copyright: `Copyright © 2021-${new Date().getFullYear()} ${author.name}`, | ||
}, | ||
socialLinks: [ | ||
{ icon: 'github', link: SOCIAL_LINKS.GITHUB }, | ||
{ icon: { svg: readSvg('../src/public/npm-icon.svg') }, link: SOCIAL_LINKS.NPM }, | ||
{ icon: { svg: readSvg('../src/public/jsdelivr-icon.svg') }, link: SOCIAL_LINKS.JSDELIVR }, | ||
{ | ||
icon: { svg: readSvg('../src/public/bundlephobia-icon.svg') }, | ||
link: SOCIAL_LINKS.BUNDLEPHOBIA, | ||
export default withPwa( | ||
defineConfig({ | ||
title: "Pokenode-ts", | ||
description: packageDescription, | ||
lang: "en-US", | ||
srcDir: "./src", | ||
lastUpdated: true, | ||
head: headConfig, | ||
themeConfig: { | ||
nav: navbarItems, | ||
sidebar: sidebarRoutes, | ||
siteTitle: "Pokenode-ts", | ||
logo: "/siteLogo.svg", | ||
footer: { | ||
message: `Made with ❤️<br/>Released under the ${license} License`, | ||
copyright: `Copyright © 2021-${new Date().getFullYear()} ${author.name}`, | ||
}, | ||
{ | ||
icon: { svg: readSvg('../src/public/packagephobia-icon.svg') }, | ||
link: SOCIAL_LINKS.PACKAGEPHOBIA, | ||
socialLinks: [ | ||
{ icon: "github", link: SOCIAL_LINKS.GITHUB }, | ||
{ icon: { svg: readSvg("../src/public/npm-icon.svg") }, link: SOCIAL_LINKS.NPM }, | ||
{ icon: { svg: readSvg("../src/public/jsdelivr-icon.svg") }, link: SOCIAL_LINKS.JSDELIVR }, | ||
{ | ||
icon: { svg: readSvg("../src/public/bundlephobia-icon.svg") }, | ||
link: SOCIAL_LINKS.BUNDLEPHOBIA, | ||
}, | ||
{ | ||
icon: { svg: readSvg("../src/public/packagephobia-icon.svg") }, | ||
link: SOCIAL_LINKS.PACKAGEPHOBIA, | ||
}, | ||
], | ||
editLink: { | ||
pattern: `${repository.url}/vitepress/edit/main/docs/src/:path`, | ||
text: "Edit this page on GitHub", | ||
}, | ||
algolia: { | ||
apiKey: process.env.API_KEY as string, | ||
appId: process.env.APP_ID as string, | ||
indexName: process.env.INDEX_NAME as string, | ||
}, | ||
], | ||
editLink: { | ||
pattern: `${repository.url}/vitepress/edit/main/docs/src/:path`, | ||
text: 'Edit this page on GitHub', | ||
}, | ||
algolia: { | ||
apiKey: process.env.API_KEY as string, | ||
appId: process.env.APP_ID as string, | ||
indexName: process.env.INDEX_NAME as string, | ||
}, | ||
}, | ||
cleanUrls: true, | ||
}); | ||
cleanUrls: true, | ||
pwa: {}, | ||
}), | ||
); |
Oops, something went wrong.