Skip to content

Commit 5831757

Browse files
committed
🔧 configure tailwind & initial chrome extension
1 parent 15622b3 commit 5831757

File tree

12 files changed

+847
-50
lines changed

12 files changed

+847
-50
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export default tseslint.config({
1818
languageOptions: {
1919
// other options...
2020
parserOptions: {
21-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
21+
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
2222
tsconfigRootDir: import.meta.dirname,
2323
},
2424
},
25-
})
25+
});
2626
```
2727

2828
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
@@ -31,11 +31,11 @@ export default tseslint.config({
3131

3232
```js
3333
// eslint.config.js
34-
import react from 'eslint-plugin-react'
34+
import react from "eslint-plugin-react";
3535

3636
export default tseslint.config({
3737
// Set the react version
38-
settings: { react: { version: '18.3' } },
38+
settings: { react: { version: "18.3" } },
3939
plugins: {
4040
// Add the react plugin
4141
react,
@@ -44,7 +44,7 @@ export default tseslint.config({
4444
// other rules...
4545
// Enable its recommended rules
4646
...react.configs.recommended.rules,
47-
...react.configs['jsx-runtime'].rules,
47+
...react.configs["jsx-runtime"].rules,
4848
},
49-
})
49+
});
5050
```

eslint.config.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
66

77
export default tseslint.config(
8-
{ ignores: ['dist'] },
8+
{ ignores: ["dist"] },
99
{
1010
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11-
files: ['**/*.{ts,tsx}'],
11+
files: ["**/*.{ts,tsx}"],
1212
languageOptions: {
1313
ecmaVersion: 2020,
1414
globals: globals.browser,
1515
},
1616
plugins: {
17-
'react-hooks': reactHooks,
18-
'react-refresh': reactRefresh,
17+
"react-hooks": reactHooks,
18+
"react-refresh": reactRefresh,
1919
},
2020
rules: {
2121
...reactHooks.configs.recommended.rules,
22-
'react-refresh/only-export-components': [
23-
'warn',
22+
"react-refresh/only-export-components": [
23+
"warn",
2424
{ allowConstantExport: true },
2525
],
2626
},
27-
},
28-
)
27+
}
28+
);

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

manifest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"manifest_version": 3,
3+
"name": "Active Yuwa",
4+
"version": "0.1.0",
5+
"description": "Ask Buddie extension to improve the post reach.",
6+
"action": {
7+
"default_popup": "index.html"
8+
},
9+
"permissions": []
10+
}

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@
1414
"react-dom": "^18.3.1"
1515
},
1616
"devDependencies": {
17+
"@crxjs/vite-plugin": "^2.0.0-beta.30",
1718
"@eslint/js": "^9.17.0",
1819
"@types/react": "^18.3.18",
1920
"@types/react-dom": "^18.3.5",
2021
"@vitejs/plugin-react": "^4.3.4",
22+
"autoprefixer": "^10.4.20",
2123
"eslint": "^9.17.0",
2224
"eslint-plugin-react-hooks": "^5.0.0",
2325
"eslint-plugin-react-refresh": "^0.4.16",
2426
"globals": "^15.14.0",
27+
"postcss": "^8.5.1",
28+
"tailwindcss": "^3.4.17",
2529
"typescript": "~5.6.2",
2630
"typescript-eslint": "^8.18.2",
2731
"vite": "^6.0.5"

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
};

src/App.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
function App() {
22
return (
3-
<>
4-
<h1>Active Yuwa Extension</h1>
5-
</>
6-
)
3+
<h1 className="my-5 text-center text-3xl font-bold">
4+
Active Yuwa Extension
5+
</h1>
6+
);
77
}
88

9-
export default App
9+
export default App;

src/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

src/main.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { StrictMode } from 'react'
2-
import { createRoot } from 'react-dom/client'
3-
import App from './App.tsx'
1+
import { StrictMode } from "react";
2+
import { createRoot } from "react-dom/client";
3+
import App from "./App.tsx";
4+
import "./index.css";
45

5-
createRoot(document.getElementById('root')!).render(
6+
createRoot(document.getElementById("root")!).render(
67
<StrictMode>
78
<App />
8-
</StrictMode>,
9-
)
9+
</StrictMode>
10+
);

tailwind.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('tailwindcss').Config} */
2+
export default {
3+
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
4+
theme: {
5+
extend: {},
6+
},
7+
plugins: [],
8+
};

0 commit comments

Comments
 (0)