create-packer 1.45.16 → 1.45.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/web-app/react-rsbuild/.vscode/extensions.json +0 -1
- package/template/web-app/react-rsbuild/README.md +1 -1
- package/template/web-app/react-rsbuild/domain/app/components/app-context.tsx +6 -8
- package/template/web-app/react-rsbuild/env.d.ts +0 -6
- package/template/web-app/react-rsbuild/package.json +78 -79
- package/template/web-app/react-rsbuild/pages/home/view.css.ts +7 -0
- package/template/web-app/react-rsbuild/pages/home/view.tsx +11 -10
- package/template/web-app/react-rsbuild/rsbuild.config.ts +1 -15
- package/template/web-app/react-rsbuild/shared/styles/global.ts +5 -5
- package/template/web-app/react-rsbuild/shared/styles/index.ts +1 -1
- package/template/web-app/react-rsbuild/shared/styles/tss.ts +6 -0
- package/template/web-app/react-rsbuild/tsconfig.json +0 -1
- package/template/web-app/react-vite/.vscode/extensions.json +0 -1
- package/template/web-app/react-vite/README.md +1 -1
- package/template/web-app/react-vite/domain/app/components/app-context.tsx +6 -8
- package/template/web-app/react-vite/package.json +77 -78
- package/template/web-app/react-vite/pages/home/view.css.ts +7 -0
- package/template/web-app/react-vite/pages/home/view.tsx +3 -2
- package/template/web-app/react-vite/shared/styles/global.ts +5 -5
- package/template/web-app/react-vite/shared/styles/index.ts +1 -0
- package/template/web-app/react-vite/shared/styles/tss.ts +6 -0
- package/template/web-app/react-vite/tsconfig.json +0 -1
- package/template/web-app/react-vite/vite-env.d.ts +6 -14
- package/template/web-app/react-vite/vite.config.ts +1 -5
- package/template/web-extension/.vscode/extensions.json +0 -1
- package/template/web-extension/README.md +1 -1
- package/template/web-extension/package.json +85 -86
- package/template/web-extension/shared/components/app-context/view.tsx +6 -8
- package/template/web-extension/shared/styles/global.ts +6 -6
- package/template/web-extension/shared/styles/index.ts +1 -0
- package/template/web-extension/shared/styles/tss.ts +6 -0
- package/template/web-extension/tsconfig.json +0 -1
- package/template/web-extension/vite-env.d.ts +6 -14
- package/template/web-extension/wxt.config.ts +1 -8
- package/template/web-app/react-rsbuild/pages/home/view.styled.ts +0 -5
- package/template/web-app/react-rsbuild/shared/types/index.ts +0 -1
- package/template/web-app/react-rsbuild/shared/types/utils.ts +0 -2
- package/template/web-app/react-vite/pages/home/view.styled.ts +0 -5
- package/template/web-app/react-vite/shared/types/index.ts +0 -1
- package/template/web-app/react-vite/shared/types/utils.ts +0 -2
- package/template/web-extension/shared/types/index.ts +0 -1
- package/template/web-extension/shared/types/utils.ts +0 -3
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react'
|
|
2
2
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
3
|
-
import {
|
|
3
|
+
import { GlobalStyles } from 'tss-react'
|
|
4
4
|
import { request } from '@/shared/service'
|
|
5
|
-
import { globalCss
|
|
5
|
+
import { globalCss } from '@/shared/styles'
|
|
6
6
|
|
|
7
7
|
const queryClient = new QueryClient({
|
|
8
8
|
defaultOptions: {
|
|
@@ -21,11 +21,9 @@ export interface propsType {
|
|
|
21
21
|
}
|
|
22
22
|
export const Root: FunctionComponent<propsType> = props => {
|
|
23
23
|
return (
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</QueryClientProvider>
|
|
29
|
-
</ThemeProvider>
|
|
24
|
+
<QueryClientProvider client={queryClient}>
|
|
25
|
+
<GlobalStyles styles={globalCss} />
|
|
26
|
+
{props.children}
|
|
27
|
+
</QueryClientProvider>
|
|
30
28
|
)
|
|
31
29
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/// <reference types="@rsbuild/core/types" />
|
|
2
|
-
import '@emotion/react'
|
|
3
|
-
import { type themeType } from '@/shared/styles'
|
|
4
2
|
|
|
5
3
|
declare global {
|
|
6
4
|
interface ImportMetaEnv {
|
|
@@ -21,7 +19,3 @@ declare module '*.svg?react' {
|
|
|
21
19
|
const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement>>
|
|
22
20
|
export default ReactComponent
|
|
23
21
|
}
|
|
24
|
-
|
|
25
|
-
declare module '@emotion/react' {
|
|
26
|
-
export interface Theme extends themeType {}
|
|
27
|
-
}
|
|
@@ -1,79 +1,78 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-rsbuild",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"prepare": "husky",
|
|
8
|
-
"dev": "rsbuild dev",
|
|
9
|
-
"build": "rsbuild build",
|
|
10
|
-
"build:analyse": "rsbuild build --env-mode analyse",
|
|
11
|
-
"build:rsdoctor": "cross-env RSDOCTOR=true rsbuild build",
|
|
12
|
-
"preview": "rsbuild preview",
|
|
13
|
-
"up:rsbuild": "pnpm up @rsbuild/* -L",
|
|
14
|
-
"format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less}\"",
|
|
15
|
-
"lint": "tsc --noEmit && eslint --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less,ts,tsx}",
|
|
16
|
-
"lint:fix": "eslint --fix && stylelint **/*.{css,scss,less,ts,tsx} --fix",
|
|
17
|
-
"cz": "cz",
|
|
18
|
-
"push": "npm run commit && git push",
|
|
19
|
-
"commit": "git add . && npm run cz"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@emotion/react": "11.14.0",
|
|
23
|
-
"@
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"react": "18.3.1",
|
|
31
|
-
"react-
|
|
32
|
-
"react-
|
|
33
|
-
"react
|
|
34
|
-
"type-fest": "4.33.0",
|
|
35
|
-
"zustand": "5.0.3"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@commitlint/cli": "17.6.1",
|
|
39
|
-
"@commitlint/config-conventional": "17.6.1",
|
|
40
|
-
"@commitlint/cz-commitlint": "17.5.0",
|
|
41
|
-
"@eslint/js": "9.15.0",
|
|
42
|
-
"@rsbuild/core": "1.5.2",
|
|
43
|
-
"@rsbuild/plugin-eslint": "1.1.2",
|
|
44
|
-
"@rsbuild/plugin-react": "1.4.0",
|
|
45
|
-
"@rsbuild/plugin-svgr": "1.2.2",
|
|
46
|
-
"@rsbuild/plugin-type-check": "1.2.4",
|
|
47
|
-
"@rsdoctor/rspack-plugin": "1.2.3",
|
|
48
|
-
"@
|
|
49
|
-
"@types/
|
|
50
|
-
"@types/
|
|
51
|
-
"@types/react": "18.3.
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"eslint": "
|
|
58
|
-
"eslint-import
|
|
59
|
-
"eslint-plugin-
|
|
60
|
-
"eslint-plugin-react": "
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"postcss": "
|
|
65
|
-
"postcss-
|
|
66
|
-
"postcss-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"stylelint": "
|
|
70
|
-
"stylelint-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-rsbuild",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"prepare": "husky",
|
|
8
|
+
"dev": "rsbuild dev",
|
|
9
|
+
"build": "rsbuild build",
|
|
10
|
+
"build:analyse": "rsbuild build --env-mode analyse",
|
|
11
|
+
"build:rsdoctor": "cross-env RSDOCTOR=true rsbuild build",
|
|
12
|
+
"preview": "rsbuild preview",
|
|
13
|
+
"up:rsbuild": "pnpm up @rsbuild/* -L",
|
|
14
|
+
"format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less}\"",
|
|
15
|
+
"lint": "tsc --noEmit && eslint --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less,ts,tsx}",
|
|
16
|
+
"lint:fix": "eslint --fix && stylelint **/*.{css,scss,less,ts,tsx} --fix",
|
|
17
|
+
"cz": "cz",
|
|
18
|
+
"push": "npm run commit && git push",
|
|
19
|
+
"commit": "git add . && npm run cz"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@emotion/react": "11.14.0",
|
|
23
|
+
"@tanstack/react-query": "5.51.15",
|
|
24
|
+
"axios": "1.7.9",
|
|
25
|
+
"define-zustand": "3.4.0",
|
|
26
|
+
"es-toolkit": "1.39.8",
|
|
27
|
+
"immer": "10.0.1",
|
|
28
|
+
"qs": "6.11.2",
|
|
29
|
+
"react": "18.3.1",
|
|
30
|
+
"react-dom": "18.3.1",
|
|
31
|
+
"react-router": "7.5.0",
|
|
32
|
+
"react-use": "17.5.0",
|
|
33
|
+
"tss-react": "4.9.19",
|
|
34
|
+
"type-fest": "4.33.0",
|
|
35
|
+
"zustand": "5.0.3"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@commitlint/cli": "17.6.1",
|
|
39
|
+
"@commitlint/config-conventional": "17.6.1",
|
|
40
|
+
"@commitlint/cz-commitlint": "17.5.0",
|
|
41
|
+
"@eslint/js": "9.15.0",
|
|
42
|
+
"@rsbuild/core": "1.5.2",
|
|
43
|
+
"@rsbuild/plugin-eslint": "1.1.2",
|
|
44
|
+
"@rsbuild/plugin-react": "1.4.0",
|
|
45
|
+
"@rsbuild/plugin-svgr": "1.2.2",
|
|
46
|
+
"@rsbuild/plugin-type-check": "1.2.4",
|
|
47
|
+
"@rsdoctor/rspack-plugin": "1.2.3",
|
|
48
|
+
"@types/node": "18.16.0",
|
|
49
|
+
"@types/qs": "6.9.7",
|
|
50
|
+
"@types/react": "18.3.3",
|
|
51
|
+
"@types/react-dom": "18.3.0",
|
|
52
|
+
"autoprefixer": "10.4.14",
|
|
53
|
+
"commitizen": "4.3.0",
|
|
54
|
+
"cross-env": "7.0.3",
|
|
55
|
+
"cssnano": "6.0.0",
|
|
56
|
+
"eslint": "9.17.0",
|
|
57
|
+
"eslint-import-resolver-typescript": "3.7.0",
|
|
58
|
+
"eslint-plugin-import": "2.31.0",
|
|
59
|
+
"eslint-plugin-react": "7.37.2",
|
|
60
|
+
"eslint-plugin-react-hooks": "5.1.0",
|
|
61
|
+
"globals": "15.12.0",
|
|
62
|
+
"husky": "9.1.6",
|
|
63
|
+
"postcss": "8.4.35",
|
|
64
|
+
"postcss-import": "16.0.1",
|
|
65
|
+
"postcss-nesting": "12.0.3",
|
|
66
|
+
"postcss-styled-syntax": "0.6.4",
|
|
67
|
+
"prettier": "3.2.5",
|
|
68
|
+
"stylelint": "16.10.0",
|
|
69
|
+
"stylelint-config-standard": "36.0.1",
|
|
70
|
+
"stylelint-webpack-plugin": "5.0.0",
|
|
71
|
+
"typescript": "5.8.2"
|
|
72
|
+
},
|
|
73
|
+
"config": {
|
|
74
|
+
"commitizen": {
|
|
75
|
+
"path": "@commitlint/cz-commitlint"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { useHomeData } from '@/shared/service'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export default function Home() {
|
|
5
|
-
const { data } = useHomeData()
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
1
|
+
import { useHomeData } from '@/shared/service'
|
|
2
|
+
import { useStyles } from './view.css'
|
|
3
|
+
|
|
4
|
+
export default function Home() {
|
|
5
|
+
const { data } = useHomeData()
|
|
6
|
+
const { classes } = useStyles()
|
|
7
|
+
|
|
8
|
+
console.log('data', data)
|
|
9
|
+
|
|
10
|
+
return <div className={classes.root}>sdfs</div>
|
|
11
|
+
}
|
|
@@ -41,13 +41,6 @@ export default defineConfig(({ envMode, command }) => {
|
|
|
41
41
|
new StylelintWebpackPlugin(),
|
|
42
42
|
process.env.RSDOCTOR && new RsdoctorRspackPlugin()
|
|
43
43
|
]
|
|
44
|
-
},
|
|
45
|
-
swc: {
|
|
46
|
-
jsc: {
|
|
47
|
-
experimental: {
|
|
48
|
-
plugins: [['@swc/plugin-emotion', {}]]
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
44
|
}
|
|
52
45
|
},
|
|
53
46
|
plugins: [
|
|
@@ -59,14 +52,7 @@ export default defineConfig(({ envMode, command }) => {
|
|
|
59
52
|
}
|
|
60
53
|
}),
|
|
61
54
|
pluginSvgr(),
|
|
62
|
-
pluginReact(
|
|
63
|
-
reactRefreshOptions: {
|
|
64
|
-
exclude: [/\.css\.ts$/]
|
|
65
|
-
},
|
|
66
|
-
swcReactOptions: {
|
|
67
|
-
importSource: '@emotion/react'
|
|
68
|
-
}
|
|
69
|
-
})
|
|
55
|
+
pluginReact()
|
|
70
56
|
],
|
|
71
57
|
performance: {
|
|
72
58
|
removeConsole: command === 'build' ? ['log'] : false,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './global'
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './tss'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react'
|
|
2
2
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
3
|
-
import {
|
|
3
|
+
import { GlobalStyles } from 'tss-react'
|
|
4
4
|
import { request } from '@/shared/service'
|
|
5
|
-
import { globalCss
|
|
5
|
+
import { globalCss } from '@/shared/styles'
|
|
6
6
|
|
|
7
7
|
const queryClient = new QueryClient({
|
|
8
8
|
defaultOptions: {
|
|
@@ -21,11 +21,9 @@ export interface propsType {
|
|
|
21
21
|
}
|
|
22
22
|
export const Root: FunctionComponent<propsType> = props => {
|
|
23
23
|
return (
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</QueryClientProvider>
|
|
29
|
-
</ThemeProvider>
|
|
24
|
+
<QueryClientProvider client={queryClient}>
|
|
25
|
+
<GlobalStyles styles={globalCss} />
|
|
26
|
+
{props.children}
|
|
27
|
+
</QueryClientProvider>
|
|
30
28
|
)
|
|
31
29
|
}
|
|
@@ -1,78 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-vite",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"prepare": "husky",
|
|
8
|
-
"dev": "vite",
|
|
9
|
-
"build": "tsc --noEmit && vite build",
|
|
10
|
-
"build:analyse": "tsc --noEmit && vite build --mode analyse",
|
|
11
|
-
"preview": "vite preview",
|
|
12
|
-
"up:vite": "pnpm up vite @vitejs/* vite-plugin-* -L",
|
|
13
|
-
"format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less}\"",
|
|
14
|
-
"lint": "tsc --noEmit && eslint --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less,ts,tsx}",
|
|
15
|
-
"lint:fix": "eslint --fix && stylelint **/*.{css,scss,less,ts,tsx} --fix",
|
|
16
|
-
"cz": "cz",
|
|
17
|
-
"push": "npm run commit && git push",
|
|
18
|
-
"commit": "git add . && npm run cz"
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"@emotion/react": "11.14.0",
|
|
22
|
-
"@
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"react": "18.3.1",
|
|
30
|
-
"react-
|
|
31
|
-
"react-
|
|
32
|
-
"react
|
|
33
|
-
"type-fest": "4.33.0",
|
|
34
|
-
"zustand": "5.0.3"
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@commitlint/cli": "17.6.1",
|
|
38
|
-
"@commitlint/config-conventional": "17.6.1",
|
|
39
|
-
"@commitlint/cz-commitlint": "17.5.0",
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
43
|
-
"@types/
|
|
44
|
-
"@types/
|
|
45
|
-
"@types/react": "18.3.
|
|
46
|
-
"@
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"eslint": "
|
|
52
|
-
"eslint-import
|
|
53
|
-
"eslint-plugin-
|
|
54
|
-
"eslint-plugin-react": "
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"postcss": "
|
|
60
|
-
"postcss-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"stylelint": "
|
|
65
|
-
"
|
|
66
|
-
"typescript": "
|
|
67
|
-
"
|
|
68
|
-
"vite": "
|
|
69
|
-
"vite-plugin-
|
|
70
|
-
"vite-plugin-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-vite",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"prepare": "husky",
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "tsc --noEmit && vite build",
|
|
10
|
+
"build:analyse": "tsc --noEmit && vite build --mode analyse",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"up:vite": "pnpm up vite @vitejs/* vite-plugin-* -L",
|
|
13
|
+
"format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less}\"",
|
|
14
|
+
"lint": "tsc --noEmit && eslint --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less,ts,tsx}",
|
|
15
|
+
"lint:fix": "eslint --fix && stylelint **/*.{css,scss,less,ts,tsx} --fix",
|
|
16
|
+
"cz": "cz",
|
|
17
|
+
"push": "npm run commit && git push",
|
|
18
|
+
"commit": "git add . && npm run cz"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@emotion/react": "11.14.0",
|
|
22
|
+
"@tanstack/react-query": "5.51.15",
|
|
23
|
+
"axios": "1.7.9",
|
|
24
|
+
"define-zustand": "3.4.0",
|
|
25
|
+
"es-toolkit": "1.39.8",
|
|
26
|
+
"immer": "10.0.1",
|
|
27
|
+
"qs": "6.11.2",
|
|
28
|
+
"react": "18.3.1",
|
|
29
|
+
"react-dom": "18.3.1",
|
|
30
|
+
"react-router": "7.5.0",
|
|
31
|
+
"react-use": "17.5.0",
|
|
32
|
+
"tss-react": "4.9.19",
|
|
33
|
+
"type-fest": "4.33.0",
|
|
34
|
+
"zustand": "5.0.3"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@commitlint/cli": "17.6.1",
|
|
38
|
+
"@commitlint/config-conventional": "17.6.1",
|
|
39
|
+
"@commitlint/cz-commitlint": "17.5.0",
|
|
40
|
+
"@eslint/js": "9.15.0",
|
|
41
|
+
"@faker-js/faker": "8.4.1",
|
|
42
|
+
"@types/node": "18.16.0",
|
|
43
|
+
"@types/qs": "6.9.7",
|
|
44
|
+
"@types/react": "18.3.3",
|
|
45
|
+
"@types/react-dom": "18.3.0",
|
|
46
|
+
"@vitejs/plugin-react": "5.0.1",
|
|
47
|
+
"autoprefixer": "10.4.14",
|
|
48
|
+
"commitizen": "4.3.0",
|
|
49
|
+
"cssnano": "6.0.0",
|
|
50
|
+
"eslint": "9.17.0",
|
|
51
|
+
"eslint-import-resolver-typescript": "3.7.0",
|
|
52
|
+
"eslint-plugin-import": "2.31.0",
|
|
53
|
+
"eslint-plugin-react": "7.37.2",
|
|
54
|
+
"eslint-plugin-react-hooks": "5.1.0",
|
|
55
|
+
"globals": "15.12.0",
|
|
56
|
+
"husky": "9.1.6",
|
|
57
|
+
"inquirer": "8.1.2",
|
|
58
|
+
"postcss": "8.4.35",
|
|
59
|
+
"postcss-import": "16.0.1",
|
|
60
|
+
"postcss-nesting": "12.0.3",
|
|
61
|
+
"prettier": "3.2.5",
|
|
62
|
+
"rollup-plugin-visualizer": "5.12.0",
|
|
63
|
+
"stylelint": "16.10.0",
|
|
64
|
+
"stylelint-config-standard": "36.0.1",
|
|
65
|
+
"typescript": "5.8.2",
|
|
66
|
+
"typescript-eslint": "8.15.0",
|
|
67
|
+
"vite": "7.1.3",
|
|
68
|
+
"vite-plugin-checker": "0.10.2",
|
|
69
|
+
"vite-plugin-mock-dev-server": "1.9.3",
|
|
70
|
+
"vite-plugin-svgr": "4.5.0"
|
|
71
|
+
},
|
|
72
|
+
"config": {
|
|
73
|
+
"commitizen": {
|
|
74
|
+
"path": "@commitlint/cz-commitlint"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useHomeData } from '@/shared/service'
|
|
2
|
-
import {
|
|
2
|
+
import { useStyles } from './view.css'
|
|
3
3
|
|
|
4
4
|
export default function Home() {
|
|
5
5
|
const { data } = useHomeData()
|
|
6
|
+
const { classes } = useStyles()
|
|
6
7
|
|
|
7
8
|
console.log('data', data)
|
|
8
9
|
|
|
9
|
-
return <
|
|
10
|
+
return <div className={classes.root}>sdfs</div>
|
|
10
11
|
}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
2
|
/// <reference types="vite-plugin-svgr/client" />
|
|
3
|
-
import '@emotion/react'
|
|
4
|
-
import { type themeType } from '@/shared/styles'
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// 更多环境变量...
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface ImportMeta {
|
|
14
|
-
readonly env: ImportMetaEnv
|
|
15
|
-
}
|
|
4
|
+
interface ImportMetaEnv {
|
|
5
|
+
readonly VITE_BASE_URL: string
|
|
6
|
+
readonly VITE_API_HOST: string
|
|
7
|
+
// 更多环境变量...
|
|
16
8
|
}
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
interface ImportMeta {
|
|
11
|
+
readonly env: ImportMetaEnv
|
|
20
12
|
}
|
|
@@ -20,11 +20,7 @@ export default defineConfig(({ mode }) => {
|
|
|
20
20
|
typescript: true,
|
|
21
21
|
eslint: { useFlatConfig: true, lintCommand: 'eslint', dev: { logLevel: ['error'] } }
|
|
22
22
|
}),
|
|
23
|
-
react(
|
|
24
|
-
babel: {
|
|
25
|
-
plugins: ['@emotion']
|
|
26
|
-
}
|
|
27
|
-
})
|
|
23
|
+
react()
|
|
28
24
|
]
|
|
29
25
|
|
|
30
26
|
if (mode === 'analyse') {
|
|
@@ -1,86 +1,85 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "web-extension",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"prepare": "husky",
|
|
8
|
-
"dev": "wxt",
|
|
9
|
-
"dev:firefox": "wxt -b firefox",
|
|
10
|
-
"build": "wxt build",
|
|
11
|
-
"build_dev": "wxt build --mode dev",
|
|
12
|
-
"build:firefox": "wxt build -b firefox",
|
|
13
|
-
"build_dev:firefox": "wxt build -b firefox --mode dev",
|
|
14
|
-
"zip": "wxt zip",
|
|
15
|
-
"zip_dev": "wxt zip --mode dev",
|
|
16
|
-
"zip:firefox": "wxt zip -b firefox",
|
|
17
|
-
"zip_dev:firefox": "wxt zip -b firefox --mode dev",
|
|
18
|
-
"postinstall": "wxt prepare",
|
|
19
|
-
"up:vite": "pnpm up vite @vitejs/* -L",
|
|
20
|
-
"format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less}\"",
|
|
21
|
-
"lint": "tsc --noEmit && eslint **/*.{tsx,ts} && stylelint **/*.{css,scss,less,ts,tsx}",
|
|
22
|
-
"lint:fix": "eslint **/*.{tsx,ts} --fix && stylelint **/*.{css,scss,less,ts,tsx} --fix",
|
|
23
|
-
"cz": "cz",
|
|
24
|
-
"push": "npm run commit && git push",
|
|
25
|
-
"commit": "git add . && npm run cz"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@emotion/react": "11.14.0",
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"react": "18.3.1",
|
|
38
|
-
"react
|
|
39
|
-
"type-fest": "4.33.0",
|
|
40
|
-
"zustand": "5.0.3"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@commitlint/cli": "17.6.1",
|
|
44
|
-
"@commitlint/config-conventional": "17.6.1",
|
|
45
|
-
"@commitlint/cz-commitlint": "17.5.0",
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@types/
|
|
49
|
-
"@types/
|
|
50
|
-
"@types/
|
|
51
|
-
"@types/react": "18.3.
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"eslint": "
|
|
58
|
-
"eslint-import
|
|
59
|
-
"eslint-plugin-
|
|
60
|
-
"eslint-plugin-react": "
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"postcss": "
|
|
66
|
-
"postcss-
|
|
67
|
-
"postcss-
|
|
68
|
-
"postcss-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"stylelint": "
|
|
74
|
-
"
|
|
75
|
-
"typescript": "
|
|
76
|
-
"
|
|
77
|
-
"vite": "
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "web-extension",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"prepare": "husky",
|
|
8
|
+
"dev": "wxt",
|
|
9
|
+
"dev:firefox": "wxt -b firefox",
|
|
10
|
+
"build": "wxt build",
|
|
11
|
+
"build_dev": "wxt build --mode dev",
|
|
12
|
+
"build:firefox": "wxt build -b firefox",
|
|
13
|
+
"build_dev:firefox": "wxt build -b firefox --mode dev",
|
|
14
|
+
"zip": "wxt zip",
|
|
15
|
+
"zip_dev": "wxt zip --mode dev",
|
|
16
|
+
"zip:firefox": "wxt zip -b firefox",
|
|
17
|
+
"zip_dev:firefox": "wxt zip -b firefox --mode dev",
|
|
18
|
+
"postinstall": "wxt prepare",
|
|
19
|
+
"up:vite": "pnpm up vite @vitejs/* -L",
|
|
20
|
+
"format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less}\"",
|
|
21
|
+
"lint": "tsc --noEmit && eslint **/*.{tsx,ts} && stylelint **/*.{css,scss,less,ts,tsx}",
|
|
22
|
+
"lint:fix": "eslint **/*.{tsx,ts} --fix && stylelint **/*.{css,scss,less,ts,tsx} --fix",
|
|
23
|
+
"cz": "cz",
|
|
24
|
+
"push": "npm run commit && git push",
|
|
25
|
+
"commit": "git add . && npm run cz"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@emotion/react": "11.14.0",
|
|
29
|
+
"@tanstack/react-query": "5.51.15",
|
|
30
|
+
"@webext-core/messaging": "2.2.0",
|
|
31
|
+
"axios": "1.7.9",
|
|
32
|
+
"define-zustand": "3.4.0",
|
|
33
|
+
"es-toolkit": "1.39.8",
|
|
34
|
+
"immer": "10.0.1",
|
|
35
|
+
"qs": "6.11.2",
|
|
36
|
+
"react": "18.3.1",
|
|
37
|
+
"react-dom": "18.3.1",
|
|
38
|
+
"tss-react": "4.9.19",
|
|
39
|
+
"type-fest": "4.33.0",
|
|
40
|
+
"zustand": "5.0.3"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@commitlint/cli": "17.6.1",
|
|
44
|
+
"@commitlint/config-conventional": "17.6.1",
|
|
45
|
+
"@commitlint/cz-commitlint": "17.5.0",
|
|
46
|
+
"@eslint/js": "9.15.0",
|
|
47
|
+
"@types/chrome": "0.0.254",
|
|
48
|
+
"@types/node": "18.16.0",
|
|
49
|
+
"@types/qs": "6.9.7",
|
|
50
|
+
"@types/react": "18.3.3",
|
|
51
|
+
"@types/react-dom": "18.3.0",
|
|
52
|
+
"@vitejs/plugin-react": "5.0.1",
|
|
53
|
+
"autoprefixer": "10.4.14",
|
|
54
|
+
"commitizen": "4.3.0",
|
|
55
|
+
"cssnano": "6.0.0",
|
|
56
|
+
"eslint": "9.17.0",
|
|
57
|
+
"eslint-import-resolver-typescript": "3.7.0",
|
|
58
|
+
"eslint-plugin-import": "2.31.0",
|
|
59
|
+
"eslint-plugin-react": "7.37.2",
|
|
60
|
+
"eslint-plugin-react-hooks": "5.1.0",
|
|
61
|
+
"globals": "15.12.0",
|
|
62
|
+
"husky": "9.1.6",
|
|
63
|
+
"inquirer": "^8.1.2",
|
|
64
|
+
"postcss": "8.4.31",
|
|
65
|
+
"postcss-import": "15.1.0",
|
|
66
|
+
"postcss-nesting": "11.2.2",
|
|
67
|
+
"postcss-scss": "4.0.9",
|
|
68
|
+
"postcss-styled-syntax": "0.6.4",
|
|
69
|
+
"prettier": "3.2.5",
|
|
70
|
+
"rimraf": "5.0.1",
|
|
71
|
+
"sass": "1.63.4",
|
|
72
|
+
"stylelint": "16.10.0",
|
|
73
|
+
"stylelint-config-standard": "36.0.1",
|
|
74
|
+
"typescript": "5.8.2",
|
|
75
|
+
"typescript-eslint": "8.28.0",
|
|
76
|
+
"vite": "7.1.3",
|
|
77
|
+
"vite-plugin-svgr": "4.5.0",
|
|
78
|
+
"wxt": "0.20.5"
|
|
79
|
+
},
|
|
80
|
+
"config": {
|
|
81
|
+
"commitizen": {
|
|
82
|
+
"path": "@commitlint/cz-commitlint"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode } from 'react'
|
|
2
2
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
3
|
-
import {
|
|
4
|
-
import { createGlobalCss
|
|
3
|
+
import { GlobalStyles } from 'tss-react'
|
|
4
|
+
import { createGlobalCss } from '@/shared/styles'
|
|
5
5
|
|
|
6
6
|
const queryClient = new QueryClient()
|
|
7
7
|
|
|
8
8
|
const AppContext: FunctionComponent<{ children: ReactNode; classNameSpace?: string }> = props => {
|
|
9
9
|
return (
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</QueryClientProvider>
|
|
15
|
-
</ThemeProvider>
|
|
10
|
+
<QueryClientProvider client={queryClient}>
|
|
11
|
+
<GlobalStyles styles={createGlobalCss(props.classNameSpace)} />
|
|
12
|
+
{props.children}
|
|
13
|
+
</QueryClientProvider>
|
|
16
14
|
)
|
|
17
15
|
}
|
|
18
16
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSInterpolation } from 'tss-react'
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
margin: 0
|
|
3
|
+
export function createGlobalCss(nameSpace?: string): CSSInterpolation {
|
|
4
|
+
return {
|
|
5
|
+
[nameSpace ? `.${nameSpace}` : 'body']: {
|
|
6
|
+
margin: 0
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
}
|
|
9
9
|
}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
2
|
/// <reference types="./.wxt/wxt.d.ts" />
|
|
3
|
-
import '@emotion/react'
|
|
4
|
-
import { type themeType } from '@/shared/styles'
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// 更多环境变量...
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface ImportMeta {
|
|
14
|
-
readonly env: ImportMetaEnv
|
|
15
|
-
}
|
|
4
|
+
interface ImportMetaEnv {
|
|
5
|
+
readonly VITE_API_HOST: string
|
|
6
|
+
readonly VITE_APP_ID: string
|
|
7
|
+
// 更多环境变量...
|
|
16
8
|
}
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
interface ImportMeta {
|
|
11
|
+
readonly env: ImportMetaEnv
|
|
20
12
|
}
|
|
@@ -29,14 +29,7 @@ export default defineConfig({
|
|
|
29
29
|
runner: { disabled: true },
|
|
30
30
|
imports: { eslintrc: { enabled: 9 } },
|
|
31
31
|
vite: ({ mode }) => ({
|
|
32
|
-
plugins: [
|
|
33
|
-
svgr(),
|
|
34
|
-
react({
|
|
35
|
-
babel: {
|
|
36
|
-
plugins: ['@emotion']
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
] as any,
|
|
32
|
+
plugins: [svgr(), react()] as any,
|
|
40
33
|
resolve: {
|
|
41
34
|
alias: {
|
|
42
35
|
'@': __dirname
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils'
|