-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8a28662
Showing
21 changed files
with
1,917 additions
and
0 deletions.
There are no files selected for viewing
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,37 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Set node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Setup | ||
run: npm i -g @antfu/ni | ||
|
||
- name: Install | ||
run: nci | ||
|
||
- name: Lint | ||
run: nr style | ||
|
||
- name: Build | ||
run: nr build |
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,6 @@ | ||
npm-debug.log | ||
node_modules/ | ||
dist/ | ||
tmp/ | ||
.DS_Store | ||
dist.zip |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx 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,16 @@ | ||
# Chrome Extension Starter | ||
|
||
Chrome extension starter template with React, TypeScript, Vite and Tailwind | ||
|
||
## Development | ||
|
||
```bash | ||
# Install dependencies | ||
pnpm install | ||
|
||
# Development | ||
pnpm dev | ||
|
||
# Build | ||
pnpm build | ||
``` |
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,24 @@ | ||
/** | ||
* https://github.com/vercel/next.js/blob/canary/lint-staged.config.js | ||
*/ | ||
|
||
const { quote } = require("shell-quote"); | ||
|
||
const isWin = process.platform === "win32"; | ||
|
||
module.exports = { | ||
"**/*.{js,jsx,cjs,mjs,ts,tsx,mts,cts,md,json}": (filenames) => { | ||
const escapedFileNames = filenames | ||
.map((filename) => `"${isWin ? filename : escape([filename])}"`) | ||
.join(" "); | ||
return [ | ||
`prettier --write ${escapedFileNames}`, | ||
`git add ${escapedFileNames}`, | ||
]; | ||
}, | ||
}; | ||
|
||
function escape(str) { | ||
const escaped = quote(str); | ||
return escaped.replace(/\\@/g, "@"); | ||
} |
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,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Options</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="./src/options.tsx"></script> | ||
</body> | ||
</html> |
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,39 @@ | ||
{ | ||
"name": "chrome-extension-starter", | ||
"private": true, | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"prepare": "husky install", | ||
"dev": "vite build --watch", | ||
"build": "vite build", | ||
"style": "prettier --check \"src/**/*.{ts,tsx}\"", | ||
"style:fix": "prettier --write \"src/**/*.{ts,tsx}\"" | ||
}, | ||
"author": "MichaelYuhe", | ||
"license": "MIT", | ||
"dependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
}, | ||
"prettier": { | ||
"tabWidth": 2 | ||
}, | ||
"devDependencies": { | ||
"@tailwindcss/forms": "^0.5.7", | ||
"@types/chrome": "0.0.158", | ||
"@types/node": "^20.10.4", | ||
"@types/react": "^18.0.29", | ||
"@types/react-dom": "^18.0.11", | ||
"@vitejs/plugin-react-swc": "^3.5.0", | ||
"autoprefixer": "^10.4.16", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^15.2.0", | ||
"postcss": "^8.4.32", | ||
"prettier": "^2.2.1", | ||
"shell-quote": "^1.8.1", | ||
"tailwindcss": "^3.3.6", | ||
"typescript": "^5.0.4", | ||
"vite": "^5.0.7" | ||
} | ||
} |
Oops, something went wrong.