create-packer 1.30.2 → 1.31.0

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.
Files changed (45) hide show
  1. package/package.json +2 -2
  2. package/template/web-app/next/package.json +1 -0
  3. package/template/web-app/next/postcss.config.js +1 -0
  4. package/template/web-app/next/tailwind.config.js +20 -0
  5. package/template/web-app/react/README.md +1 -1
  6. package/template/web-app/react/domain/app/components/app.tsx +1 -4
  7. package/template/web-app/react/index.css +3 -0
  8. package/template/web-app/react/package.json +78 -78
  9. package/template/web-app/react/pages/home/home.css +1 -0
  10. package/template/web-app/react/pages/home/home.tsx +2 -8
  11. package/template/web-app/react/postcss.config.cjs +2 -0
  12. package/template/web-app/react/tailwind.config.cjs +18 -0
  13. package/template/web-app/react-webpack/domain/app/components/app.tsx +1 -4
  14. package/template/web-app/react-webpack/index.css +3 -0
  15. package/template/web-app/react-webpack/package.json +86 -86
  16. package/template/web-app/react-webpack/pages/home/home.module.css +3 -0
  17. package/template/web-app/react-webpack/pages/home/home.tsx +3 -8
  18. package/template/web-app/react-webpack/postcss.config.js +2 -0
  19. package/template/web-app/react-webpack/tailwind.config.js +18 -0
  20. package/template/web-app/vue/README.md +1 -1
  21. package/template/web-app/vue/package.json +70 -70
  22. package/template/web-extension/README.md +3 -4
  23. package/template/web-extension/content_script/content.css +3 -0
  24. package/template/web-extension/content_script/content.tsx +2 -0
  25. package/template/web-extension/content_script/index.tsx +2 -2
  26. package/template/web-extension/domain/app/components/app-context.tsx +4 -3
  27. package/template/web-extension/domain/app/components/index.ts +1 -1
  28. package/template/web-extension/package.json +76 -76
  29. package/template/web-extension/popup/index.tsx +2 -2
  30. package/template/web-extension/popup/popup.container.tsx +2 -0
  31. package/template/web-extension/popup/popup.css +3 -0
  32. package/template/web-extension/postcss.config.cjs +2 -0
  33. package/template/web-extension/tailwind.config.cjs +14 -0
  34. package/template/web-app/react/shared/theme/index.ts +0 -2
  35. package/template/web-app/react/shared/theme/theme.components.tsx +0 -7
  36. package/template/web-app/react/shared/theme/theme.d.ts +0 -8
  37. package/template/web-app/react/shared/theme/theme.styles.ts +0 -7
  38. package/template/web-app/react-webpack/shared/theme/index.ts +0 -2
  39. package/template/web-app/react-webpack/shared/theme/theme.components.tsx +0 -7
  40. package/template/web-app/react-webpack/shared/theme/theme.d.ts +0 -8
  41. package/template/web-app/react-webpack/shared/theme/theme.styles.ts +0 -7
  42. package/template/web-extension/shared/theme/index.ts +0 -2
  43. package/template/web-extension/shared/theme/theme.components.tsx +0 -7
  44. package/template/web-extension/shared/theme/theme.d.ts +0 -8
  45. package/template/web-extension/shared/theme/theme.styles.ts +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.30.2",
3
+ "version": "1.31.0",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -22,7 +22,7 @@
22
22
  "ora": "5.4.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@commitlint/config-conventional": "^17.6.6",
25
+ "@commitlint/config-conventional": "^17.7.0",
26
26
  "@commitlint/cz-commitlint": "17.4.2",
27
27
  "@types/fs-extra": "9.0.12",
28
28
  "@types/inquirer": "7.3.3",
@@ -24,6 +24,7 @@
24
24
  "postcss": "8.4.35",
25
25
  "react": "18.2.0",
26
26
  "react-dom": "18.2.0",
27
+ "tailwindcss": "3.3.3",
27
28
  "typescript": "5.3.3"
28
29
  },
29
30
  "devDependencies": {
@@ -1,5 +1,6 @@
1
1
  module.exports = {
2
2
  plugins: {
3
+ tailwindcss: {},
3
4
  autoprefixer: {}
4
5
  }
5
6
  }
@@ -0,0 +1,20 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ content: [
4
+ './pages/**/*.{js,ts,jsx,tsx,mdx}',
5
+ './components/**/*.{js,ts,jsx,tsx,mdx}',
6
+ './app/**/*.{js,ts,jsx,tsx,mdx}'
7
+ ],
8
+ theme: {
9
+ extend: {
10
+ backgroundImage: {
11
+ 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
12
+ 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))'
13
+ }
14
+ }
15
+ },
16
+ plugins: [],
17
+ corePlugins: {
18
+ preflight: false
19
+ }
20
+ }
@@ -7,7 +7,7 @@
7
7
  - Typescript
8
8
  - react-router
9
9
  - Zustand
10
- - styled-components
10
+ - Tailwindcss
11
11
  - Eslint
12
12
  - Prettier
13
13
  - axios
@@ -1,6 +1,5 @@
1
1
  import { StrictMode, useLayoutEffect } from 'react'
2
2
  import { RouterProvider } from 'react-router-dom'
3
- import { ThemeProvider } from '@/shared/theme'
4
3
  import { request } from '@/shared/service'
5
4
  import { routerInstance } from '@/domain/router'
6
5
 
@@ -16,9 +15,7 @@ const App = () => {
16
15
 
17
16
  return (
18
17
  <StrictMode>
19
- <ThemeProvider>
20
- <RouterProvider router={routerInstance} />
21
- </ThemeProvider>
18
+ <RouterProvider router={routerInstance} />
22
19
  </StrictMode>
23
20
  )
24
21
  }
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -1,78 +1,78 @@
1
- {
2
- "name": "react-vite",
3
- "private": true,
4
- "version": "0.0.0",
5
- "type": "module",
6
- "scripts": {
7
- "prepare": "husky install",
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 **/*.{tsx,ts,jsx,js} --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less}",
15
- "lint:fix": "eslint **/*.{tsx,ts,jsx,js} --fix && stylelint **/*.{css,scss,less} --fix",
16
- "cz": "cz",
17
- "push": "npm run commit && git push",
18
- "commit": "git add . && npm run cz"
19
- },
20
- "dependencies": {
21
- "1k-types": "1.2.0",
22
- "axios": "1.3.6",
23
- "define-zustand": "3.1.1",
24
- "immer": "10.0.1",
25
- "lodash-es": "4.17.21",
26
- "qs": "6.11.2",
27
- "react": "18.3.1",
28
- "react-dom": "18.3.1",
29
- "react-router-dom": "6.14.0",
30
- "react-use": "17.5.0",
31
- "styled-components": "6.1.11",
32
- "zustand": "4.4.1"
33
- },
34
- "devDependencies": {
35
- "@commitlint/cli": "17.6.1",
36
- "@commitlint/config-conventional": "17.6.1",
37
- "@commitlint/cz-commitlint": "17.5.0",
38
- "@nabla/vite-plugin-eslint": "2.0.2",
39
- "@types/lodash-es": "4.17.7",
40
- "@types/mockjs": "1.0.7",
41
- "@types/node": "18.16.0",
42
- "@types/qs": "6.9.7",
43
- "@types/react": "18.0.38",
44
- "@types/react-dom": "18.0.11",
45
- "@typescript-eslint/eslint-plugin": "7.0.2",
46
- "@typescript-eslint/parser": "7.0.2",
47
- "@vitejs/plugin-react": "4.2.1",
48
- "autoprefixer": "10.4.14",
49
- "commitizen": "4.3.0",
50
- "cssnano": "6.0.0",
51
- "eslint": "8.56.0",
52
- "eslint-import-resolver-typescript": "3.6.1",
53
- "eslint-plugin-import": "2.29.1",
54
- "eslint-plugin-prettier": "5.1.3",
55
- "eslint-plugin-react": "7.33.2",
56
- "eslint-plugin-react-hooks": "4.6.0",
57
- "husky": "8.0.3",
58
- "inquirer": "8",
59
- "mockjs": "1.1.0",
60
- "postcss": "8.4.35",
61
- "postcss-import": "16.0.1",
62
- "postcss-nesting": "12.0.3",
63
- "prettier": "3.2.5",
64
- "rollup-plugin-visualizer": "5.9.2",
65
- "stylelint": "16.2.1",
66
- "stylelint-config-standard-scss": "13.0.0",
67
- "typescript": "5.3.3",
68
- "vite": "4.5.2",
69
- "vite-plugin-mock-dev-server": "1.4.7",
70
- "vite-plugin-stylelint": "5.3.1",
71
- "vite-plugin-svgr": "4.2.0"
72
- },
73
- "config": {
74
- "commitizen": {
75
- "path": "@commitlint/cz-commitlint"
76
- }
77
- }
78
- }
1
+ {
2
+ "name": "react-vite",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "prepare": "husky install",
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 **/*.{tsx,ts,jsx,js} --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less}",
15
+ "lint:fix": "eslint **/*.{tsx,ts,jsx,js} --fix && stylelint **/*.{css,scss,less} --fix",
16
+ "cz": "cz",
17
+ "push": "npm run commit && git push",
18
+ "commit": "git add . && npm run cz"
19
+ },
20
+ "dependencies": {
21
+ "1k-types": "1.2.0",
22
+ "axios": "1.3.6",
23
+ "define-zustand": "3.1.1",
24
+ "immer": "10.0.1",
25
+ "lodash-es": "4.17.21",
26
+ "qs": "6.11.2",
27
+ "react": "18.3.1",
28
+ "react-dom": "18.3.1",
29
+ "react-router-dom": "6.14.0",
30
+ "react-use": "17.5.0",
31
+ "zustand": "4.4.1"
32
+ },
33
+ "devDependencies": {
34
+ "@commitlint/cli": "17.6.1",
35
+ "@commitlint/config-conventional": "17.6.1",
36
+ "@commitlint/cz-commitlint": "17.5.0",
37
+ "@nabla/vite-plugin-eslint": "2.0.2",
38
+ "@types/lodash-es": "4.17.7",
39
+ "@types/mockjs": "1.0.7",
40
+ "@types/node": "18.16.0",
41
+ "@types/qs": "6.9.7",
42
+ "@types/react": "18.0.38",
43
+ "@types/react-dom": "18.0.11",
44
+ "@typescript-eslint/eslint-plugin": "7.0.2",
45
+ "@typescript-eslint/parser": "7.0.2",
46
+ "@vitejs/plugin-react": "4.2.1",
47
+ "autoprefixer": "10.4.14",
48
+ "commitizen": "4.3.0",
49
+ "cssnano": "6.0.0",
50
+ "eslint": "8.56.0",
51
+ "eslint-import-resolver-typescript": "3.6.1",
52
+ "eslint-plugin-import": "2.29.1",
53
+ "eslint-plugin-prettier": "5.1.3",
54
+ "eslint-plugin-react": "7.33.2",
55
+ "eslint-plugin-react-hooks": "4.6.0",
56
+ "husky": "8.0.3",
57
+ "inquirer": "^8.1.2",
58
+ "mockjs": "1.1.0",
59
+ "postcss": "8.4.35",
60
+ "postcss-import": "16.0.1",
61
+ "postcss-nesting": "12.0.3",
62
+ "prettier": "3.2.5",
63
+ "rollup-plugin-visualizer": "5.9.2",
64
+ "stylelint": "16.2.1",
65
+ "stylelint-config-standard-scss": "13.0.0",
66
+ "tailwindcss": "3.3.1",
67
+ "typescript": "5.3.3",
68
+ "vite": "4.5.2",
69
+ "vite-plugin-mock-dev-server": "1.4.7",
70
+ "vite-plugin-stylelint": "5.3.1",
71
+ "vite-plugin-svgr": "4.2.0"
72
+ },
73
+ "config": {
74
+ "commitizen": {
75
+ "path": "@commitlint/cz-commitlint"
76
+ }
77
+ }
78
+ }
@@ -1,13 +1,7 @@
1
+ import './home.css'
1
2
  import { useEffect } from 'react'
2
- import { styled } from 'styled-components'
3
3
  import { request, API } from '@/shared/service'
4
4
 
5
- const Wrapper = styled.div`
6
- display: flex;
7
- justify-content: center;
8
- align-items: center;
9
- `
10
-
11
5
  export default function Home() {
12
6
  useEffect(() => {
13
7
  request.post(API.HOME_DATA).then(({ data }) => {
@@ -15,5 +9,5 @@ export default function Home() {
15
9
  })
16
10
  }, [])
17
11
 
18
- return <Wrapper>sdfs</Wrapper>
12
+ return <div className={'flex justify-center items-center'}>sdfs</div>
19
13
  }
@@ -1,6 +1,8 @@
1
1
  module.exports = {
2
2
  plugins: {
3
3
  'postcss-import': {},
4
+ 'tailwindcss/nesting': 'postcss-nesting',
5
+ tailwindcss: {},
4
6
  autoprefixer: {},
5
7
  ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
6
8
  }
@@ -0,0 +1,18 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ important: '#root',
4
+ content: [
5
+ './index.html',
6
+ './main.tsx',
7
+ './pages/**/*.{ts,tsx,js,jsx}',
8
+ './domain/**/*.{ts,tsx,js,jsx}',
9
+ './shared/**/*.{ts,tsx,js,jsx}'
10
+ ],
11
+ theme: {
12
+ extend: {}
13
+ },
14
+ plugins: [],
15
+ corePlugins: {
16
+ preflight: false
17
+ }
18
+ }
@@ -1,6 +1,5 @@
1
1
  import { StrictMode, useLayoutEffect } from 'react'
2
2
  import { RouterProvider } from 'react-router-dom'
3
- import { ThemeProvider } from '@/shared/theme'
4
3
  import { request } from '@/shared/service'
5
4
  import { routerInstance } from '@/domain/router'
6
5
 
@@ -16,9 +15,7 @@ const App = () => {
16
15
 
17
16
  return (
18
17
  <StrictMode>
19
- <ThemeProvider>
20
- <RouterProvider router={routerInstance} />
21
- </ThemeProvider>
18
+ <RouterProvider router={routerInstance} />
22
19
  </StrictMode>
23
20
  )
24
21
  }
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -1,86 +1,86 @@
1
- {
2
- "name": "react-app-webpack",
3
- "version": "1.0.0",
4
- "main": "./dist/index",
5
- "module": "./dist/index.esm.js",
6
- "private": true,
7
- "author": "1K",
8
- "scripts": {
9
- "prepare": "husky install",
10
- "dev": "webpack serve --env mode=dev",
11
- "build": "webpack --env mode=prod",
12
- "build:analyzer": "webpack --env mode=analyzer",
13
- "up:webpack": "pnpm up webpackbar webpackbar-* -L",
14
- "format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less}\"",
15
- "lint": "tsc --noEmit && eslint **/*.{tsx,ts,jsx,js} --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less}",
16
- "lint:fix": "eslint **/*.{tsx,ts,jsx,js} --fix && stylelint **/*.{css,scss,less} --fix",
17
- "cz": "cz",
18
- "push": "npm run commit && git push",
19
- "commit": "git add . && npm run cz"
20
- },
21
- "dependencies": {
22
- "1k-types": "1.2.0",
23
- "axios": "1.6.7",
24
- "define-zustand": "3.1.1",
25
- "immer": "10.0.3",
26
- "lodash-es": "4.17.21",
27
- "qs": "6.11.2",
28
- "react": "18.3.1",
29
- "react-dom": "18.3.1",
30
- "react-router-dom": "6.14.0",
31
- "react-use": "17.5.0",
32
- "styled-components": "6.1.11",
33
- "zustand": "4.4.1"
34
- },
35
- "devDependencies": {
36
- "@commitlint/cli": "18.6.1",
37
- "@commitlint/config-conventional": "18.6.2",
38
- "@commitlint/cz-commitlint": "18.6.1",
39
- "@svgr/webpack": "8.1.0",
40
- "@types/lodash-es": "4.17.12",
41
- "@types/qs": "6.9.11",
42
- "@types/react": "18.0.38",
43
- "@types/react-dom": "18.0.11",
44
- "@typescript-eslint/eslint-plugin": "7.0.2",
45
- "@typescript-eslint/parser": "7.0.2",
46
- "autoprefixer": "10.4.17",
47
- "commitizen": "4.3.0",
48
- "css-loader": "6.10.0",
49
- "cssnano": "6.0.3",
50
- "dotenv": "16.4.5",
51
- "esbuild-loader": "3",
52
- "eslint": "8.56.0",
53
- "eslint-import-resolver-typescript": "3.6.1",
54
- "eslint-plugin-import": "2.29.1",
55
- "eslint-plugin-prettier": "5.1.3",
56
- "eslint-plugin-react": "7.33.2",
57
- "eslint-plugin-react-hooks": "4.6.0",
58
- "eslint-webpack-plugin": "4.0.1",
59
- "fork-ts-checker-webpack-plugin": "9.0.2",
60
- "html-webpack-plugin": "5.6.0",
61
- "husky": "9.0.11",
62
- "mini-css-extract-plugin": "2.8.0",
63
- "postcss-import": "16.0.1",
64
- "postcss-loader": "8.1.0",
65
- "postcss-nesting": "12.0.3",
66
- "prettier": "3.2.5",
67
- "react-css-modules": "4.7.11",
68
- "react-test-renderer": "18.2.0",
69
- "rimraf": "5.0.5",
70
- "style-loader": "3.3.4",
71
- "stylelint": "16.2.1",
72
- "stylelint-config-standard-scss": "13.0.0",
73
- "stylelint-webpack-plugin": "5.0.0",
74
- "typescript": "5.3.3",
75
- "webpack": "5.91.0",
76
- "webpack-bundle-analyzer": "4.10.1",
77
- "webpack-cli": "5.1.4",
78
- "webpack-dev-server": "5.0.4",
79
- "webpackbar": "6.0.1"
80
- },
81
- "config": {
82
- "commitizen": {
83
- "path": "@commitlint/cz-commitlint"
84
- }
85
- }
86
- }
1
+ {
2
+ "name": "react-app-webpack",
3
+ "version": "1.0.0",
4
+ "main": "./dist/index",
5
+ "module": "./dist/index.esm.js",
6
+ "private": true,
7
+ "author": "1K",
8
+ "scripts": {
9
+ "prepare": "husky install",
10
+ "dev": "webpack serve --env mode=dev",
11
+ "build": "webpack --env mode=prod",
12
+ "build:analyzer": "webpack --env mode=analyzer",
13
+ "up:webpack": "pnpm up webpackbar webpackbar-* -L",
14
+ "format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less}\"",
15
+ "lint": "tsc --noEmit && eslint **/*.{tsx,ts,jsx,js} --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less}",
16
+ "lint:fix": "eslint **/*.{tsx,ts,jsx,js} --fix && stylelint **/*.{css,scss,less} --fix",
17
+ "cz": "cz",
18
+ "push": "npm run commit && git push",
19
+ "commit": "git add . && npm run cz"
20
+ },
21
+ "dependencies": {
22
+ "1k-types": "1.2.0",
23
+ "axios": "1.6.7",
24
+ "define-zustand": "3.1.1",
25
+ "immer": "10.0.3",
26
+ "lodash-es": "4.17.21",
27
+ "qs": "6.11.2",
28
+ "react": "18.3.1",
29
+ "react-dom": "18.3.1",
30
+ "react-router-dom": "6.14.0",
31
+ "react-use": "17.5.0",
32
+ "tailwindcss": "3.4.1",
33
+ "zustand": "4.4.1"
34
+ },
35
+ "devDependencies": {
36
+ "@commitlint/cli": "18.6.1",
37
+ "@commitlint/config-conventional": "18.6.2",
38
+ "@commitlint/cz-commitlint": "18.6.1",
39
+ "@svgr/webpack": "8.1.0",
40
+ "@types/lodash-es": "4.17.12",
41
+ "@types/qs": "6.9.11",
42
+ "@types/react": "18.0.38",
43
+ "@types/react-dom": "18.0.11",
44
+ "@typescript-eslint/eslint-plugin": "7.0.2",
45
+ "@typescript-eslint/parser": "7.0.2",
46
+ "autoprefixer": "10.4.17",
47
+ "commitizen": "4.3.0",
48
+ "css-loader": "6.10.0",
49
+ "cssnano": "6.0.3",
50
+ "dotenv": "16.4.5",
51
+ "esbuild-loader": "^3.2.0",
52
+ "eslint": "8.56.0",
53
+ "eslint-import-resolver-typescript": "3.6.1",
54
+ "eslint-plugin-import": "2.29.1",
55
+ "eslint-plugin-prettier": "5.1.3",
56
+ "eslint-plugin-react": "7.33.2",
57
+ "eslint-plugin-react-hooks": "4.6.0",
58
+ "eslint-webpack-plugin": "4.0.1",
59
+ "fork-ts-checker-webpack-plugin": "9.0.2",
60
+ "html-webpack-plugin": "5.6.0",
61
+ "husky": "9.0.11",
62
+ "mini-css-extract-plugin": "2.8.0",
63
+ "postcss-import": "16.0.1",
64
+ "postcss-loader": "8.1.0",
65
+ "postcss-nesting": "12.0.3",
66
+ "prettier": "3.2.5",
67
+ "react-css-modules": "4.7.11",
68
+ "react-test-renderer": "18.2.0",
69
+ "rimraf": "5.0.5",
70
+ "style-loader": "3.3.4",
71
+ "stylelint": "16.2.1",
72
+ "stylelint-config-standard-scss": "13.0.0",
73
+ "stylelint-webpack-plugin": "5.0.0",
74
+ "typescript": "5.3.3",
75
+ "webpack": "5.91.0",
76
+ "webpack-bundle-analyzer": "4.10.1",
77
+ "webpack-cli": "5.1.4",
78
+ "webpack-dev-server": "5.0.4",
79
+ "webpackbar": "6.0.1"
80
+ },
81
+ "config": {
82
+ "commitizen": {
83
+ "path": "@commitlint/cz-commitlint"
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,3 @@
1
+ .root {
2
+ @apply flex justify-center items-center;
3
+ }
@@ -1,11 +1,6 @@
1
- import { styled } from 'styled-components'
2
-
3
- const Wrapper = styled.div`
4
- display: flex;
5
- justify-content: center;
6
- align-items: center;
7
- `
1
+ import styles from './home.module.css'
8
2
 
9
3
  export default function Home() {
10
- return <Wrapper>sdfs</Wrapper>
4
+ console.log('1', 1)
5
+ return <div className={styles.root}>sdsddds</div>
11
6
  }
@@ -1,6 +1,8 @@
1
1
  module.exports = {
2
2
  plugins: {
3
3
  'postcss-import': {},
4
+ 'tailwindcss/nesting': 'postcss-nesting',
5
+ tailwindcss: {},
4
6
  autoprefixer: {},
5
7
  ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
6
8
  }
@@ -0,0 +1,18 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ important: '#root',
4
+ content: [
5
+ './index.html',
6
+ './main.tsx',
7
+ './pages/**/*.{ts,tsx,js,jsx}',
8
+ './domain/**/*.{ts,tsx,js,jsx}',
9
+ './shared/**/*.{ts,tsx,js,jsx}'
10
+ ],
11
+ theme: {
12
+ extend: {}
13
+ },
14
+ plugins: [],
15
+ corePlugins: {
16
+ preflight: false
17
+ }
18
+ }
@@ -11,4 +11,4 @@
11
11
  - Eslint
12
12
  - Prettier
13
13
  - axios
14
- - Alias @ to <project_root>
14
+ - Alias @ to <project_root>/src
@@ -1,70 +1,70 @@
1
- {
2
- "name": "vue-vite",
3
- "private": true,
4
- "version": "0.0.0",
5
- "type": "module",
6
- "scripts": {
7
- "prepare": "husky install",
8
- "dev": "vite",
9
- "build": "vue-tsc --noEmit && vite build",
10
- "build:analyse": "tsc --noEmit && vite build --mode analyse",
11
- "preview": "vite preview",
12
- "format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,vue,css,scss,less}\"",
13
- "lint": "vue-tsc --noEmit && eslint **/*.{ts,tsx,js,jsx,vue} --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less}",
14
- "lint:fix": "eslint **/*.{ts,tsx,js,jsx,vue} --fix && stylelint **/*.{css,scss,less} --fix",
15
- "cz": "cz",
16
- "push": "npm run commit && git push",
17
- "commit": "git add . && npm run cz",
18
- "up:vite": "pnpm up vite @vitejs/* vite-plugin-* -L"
19
- },
20
- "dependencies": {
21
- "1k-types": "1.2.0",
22
- "axios": "1.3.6",
23
- "lodash-es": "4.17.21",
24
- "pinia": "2.1.7",
25
- "vue": "3.4.21",
26
- "vue-router": "4.3.0"
27
- },
28
- "devDependencies": {
29
- "@commitlint/cli": "17.6.1",
30
- "@commitlint/config-conventional": "17.6.1",
31
- "@commitlint/cz-commitlint": "17.5.0",
32
- "@nabla/vite-plugin-eslint": "2.0.2",
33
- "@types/lodash-es": "4.17.12",
34
- "@types/mockjs": "1.0.10",
35
- "@typescript-eslint/eslint-plugin": "7.6.0",
36
- "@typescript-eslint/parser": "7.6.0",
37
- "@vitejs/plugin-vue": "4.6.2",
38
- "@vitejs/plugin-vue-jsx": "3.1.0",
39
- "autoprefixer": "10.4.14",
40
- "commitizen": "4.3.0",
41
- "cssnano": "6.0.0",
42
- "eslint": "8.56.0",
43
- "eslint-import-resolver-typescript": "3.6.1",
44
- "eslint-plugin-import": "2.29.1",
45
- "eslint-plugin-prettier": "5.1.3",
46
- "eslint-plugin-vue": "9.21.1",
47
- "husky": "8.0.3",
48
- "inquirer": "8",
49
- "mockjs": "1.1.0",
50
- "postcss": "8.4.38",
51
- "postcss-import": "16.1.0",
52
- "postcss-nesting": "12.1.1",
53
- "prettier": "3.2.5",
54
- "rollup-plugin-visualizer": "5.12.0",
55
- "stylelint": "16.3.1",
56
- "stylelint-config-standard-scss": "13.1.0",
57
- "tailwindcss": "3.4.3",
58
- "typescript": "5.3.3",
59
- "vite": "4.5.2",
60
- "vite-plugin-mock-dev-server": "1.5.0",
61
- "vite-plugin-stylelint": "5.3.1",
62
- "vite-svg-loader": "5.1.0",
63
- "vue-tsc": "2.0.11"
64
- },
65
- "config": {
66
- "commitizen": {
67
- "path": "@commitlint/cz-commitlint"
68
- }
69
- }
70
- }
1
+ {
2
+ "name": "vue-vite",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "prepare": "husky install",
8
+ "dev": "vite",
9
+ "build": "vue-tsc --noEmit && vite build",
10
+ "build:analyse": "tsc --noEmit && vite build --mode analyse",
11
+ "preview": "vite preview",
12
+ "format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,vue,css,scss,less}\"",
13
+ "lint": "vue-tsc --noEmit && eslint **/*.{ts,tsx,js,jsx,vue} --no-error-on-unmatched-pattern && stylelint **/*.{css,scss,less}",
14
+ "lint:fix": "eslint **/*.{ts,tsx,js,jsx,vue} --fix && stylelint **/*.{css,scss,less} --fix",
15
+ "cz": "cz",
16
+ "push": "npm run commit && git push",
17
+ "commit": "git add . && npm run cz",
18
+ "up:vite": "pnpm up vite @vitejs/* vite-plugin-* -L"
19
+ },
20
+ "dependencies": {
21
+ "1k-types": "1.2.0",
22
+ "axios": "1.3.6",
23
+ "lodash-es": "4.17.21",
24
+ "pinia": "2.1.7",
25
+ "vue": "3.4.21",
26
+ "vue-router": "4.3.0"
27
+ },
28
+ "devDependencies": {
29
+ "@commitlint/cli": "17.6.1",
30
+ "@commitlint/config-conventional": "17.6.1",
31
+ "@commitlint/cz-commitlint": "17.5.0",
32
+ "@nabla/vite-plugin-eslint": "2.0.2",
33
+ "@types/lodash-es": "4.17.12",
34
+ "@types/mockjs": "1.0.10",
35
+ "@typescript-eslint/eslint-plugin": "7.6.0",
36
+ "@typescript-eslint/parser": "7.6.0",
37
+ "@vitejs/plugin-vue": "4.6.2",
38
+ "@vitejs/plugin-vue-jsx": "3.1.0",
39
+ "autoprefixer": "10.4.14",
40
+ "commitizen": "4.3.0",
41
+ "cssnano": "6.0.0",
42
+ "eslint": "8.56.0",
43
+ "eslint-import-resolver-typescript": "3.6.1",
44
+ "eslint-plugin-import": "2.29.1",
45
+ "eslint-plugin-prettier": "5.1.3",
46
+ "eslint-plugin-vue": "9.21.1",
47
+ "husky": "8.0.3",
48
+ "inquirer": "^8.1.2",
49
+ "mockjs": "1.1.0",
50
+ "postcss": "8.4.38",
51
+ "postcss-import": "16.1.0",
52
+ "postcss-nesting": "12.1.1",
53
+ "prettier": "3.2.5",
54
+ "rollup-plugin-visualizer": "5.12.0",
55
+ "stylelint": "16.3.1",
56
+ "stylelint-config-standard-scss": "13.1.0",
57
+ "tailwindcss": "3.4.3",
58
+ "typescript": "5.3.3",
59
+ "vite": "4.5.2",
60
+ "vite-plugin-mock-dev-server": "1.5.0",
61
+ "vite-plugin-stylelint": "5.3.1",
62
+ "vite-svg-loader": "5.1.0",
63
+ "vue-tsc": "2.0.11"
64
+ },
65
+ "config": {
66
+ "commitizen": {
67
+ "path": "@commitlint/cz-commitlint"
68
+ }
69
+ }
70
+ }
@@ -5,10 +5,9 @@
5
5
  - Vite
6
6
  - React
7
7
  - Typescript
8
- - react-router
9
8
  - Zustand
10
- - styled-components
9
+ - Tailwindcss
11
10
  - Eslint
12
11
  - Prettier
13
- - ky
14
- - Alias @ to <project_root>
12
+ - axios
13
+ - Alias @ to <project_root>/src
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -1,3 +1,5 @@
1
+ import './content.css'
2
+
1
3
  export default function Home() {
2
4
  return <div>dfdsf</div>
3
5
  }
@@ -6,9 +6,9 @@ import Content from './content'
6
6
  const app = document.createElement('div')
7
7
  createRoot(app).render(
8
8
  <StrictMode>
9
- <AppContext.Root>
9
+ <AppContext>
10
10
  <Content />
11
- </AppContext.Root>
11
+ </AppContext>
12
12
  </StrictMode>
13
13
  )
14
14
 
@@ -1,6 +1,7 @@
1
1
  import { FunctionComponent, ReactNode } from 'react'
2
- import { ThemeProvider } from '@/shared/theme'
3
2
 
4
- export const Root: FunctionComponent<{ children: ReactNode }> = props => {
5
- return <ThemeProvider>{props.children}</ThemeProvider>
3
+ const AppContext: FunctionComponent<{ children?: ReactNode }> = props => {
4
+ return <div id={'app'}>{props.children}</div>
6
5
  }
6
+
7
+ export default AppContext
@@ -1 +1 @@
1
- export * as AppContext from './app-context'
1
+ export { default as AppContext } from './app-context'
@@ -1,76 +1,76 @@
1
- {
2
- "name": "web-extension",
3
- "private": true,
4
- "version": "0.0.0",
5
- "type": "module",
6
- "scripts": {
7
- "prepare": "husky install",
8
- "dev": "vite",
9
- "build": "tsc --noEmit && vite build",
10
- "preview": "vite preview",
11
- "up:vite": "pnpm up vite @vitejs/* -L",
12
- "format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less,json}\"",
13
- "lint": "tsc --noEmit && eslint **/*.{tsx,ts} && stylelint **/*.{css,scss,less}",
14
- "lint:fix": "eslint **/*.{tsx,ts} --fix && stylelint **/*.{css,scss,less} --fix",
15
- "cz": "cz",
16
- "push": "npm run commit && git push",
17
- "commit": "git add . && npm run cz"
18
- },
19
- "dependencies": {
20
- "define-zustand": "3.1.1",
21
- "immer": "10.0.1",
22
- "ky": "1.1.3",
23
- "lodash-es": "4.17.21",
24
- "qs": "6.11.2",
25
- "react": "18.3.1",
26
- "react-dom": "18.3.1",
27
- "styled-components": "6.1.11",
28
- "zustand": "4.4.1"
29
- },
30
- "devDependencies": {
31
- "1k-types": "1.2.0",
32
- "@commitlint/cli": "17.6.1",
33
- "@commitlint/config-conventional": "17.6.1",
34
- "@commitlint/cz-commitlint": "17.5.0",
35
- "@crxjs/vite-plugin": "2.0.0-beta.18",
36
- "@nabla/vite-plugin-eslint": "2.0.2",
37
- "@types/chrome": "0.0.254",
38
- "@types/lodash-es": "4.17.7",
39
- "@types/node": "18.16.0",
40
- "@types/qs": "6.9.7",
41
- "@types/react": "18.3.3",
42
- "@types/react-dom": "18.3.0",
43
- "@typescript-eslint/eslint-plugin": "7.0.2",
44
- "@typescript-eslint/parser": "7.0.2",
45
- "@vitejs/plugin-react": "4.2.1",
46
- "autoprefixer": "10.4.14",
47
- "commitizen": "4.3.0",
48
- "cssnano": "6.0.0",
49
- "eslint": "8.56.0",
50
- "eslint-import-resolver-typescript": "3.6.1",
51
- "eslint-plugin-import": "2.29.1",
52
- "eslint-plugin-prettier": "5.1.3",
53
- "eslint-plugin-react": "7.33.2",
54
- "eslint-plugin-react-hooks": "4.6.0",
55
- "husky": "8.0.3",
56
- "inquirer": "8",
57
- "postcss": "8.4.31",
58
- "postcss-import": "15.1.0",
59
- "postcss-nesting": "11.2.2",
60
- "postcss-scss": "4.0.9",
61
- "prettier": "3.2.5",
62
- "rimraf": "5.0.1",
63
- "sass": "1.63.4",
64
- "stylelint": "16.2.1",
65
- "stylelint-config-standard-scss": "13.0.0",
66
- "typescript": "5.3.3",
67
- "vite": "4.5.2",
68
- "vite-plugin-stylelint": "5.3.1",
69
- "vite-plugin-svgr": "4.2.0"
70
- },
71
- "config": {
72
- "commitizen": {
73
- "path": "@commitlint/cz-commitlint"
74
- }
75
- }
76
- }
1
+ {
2
+ "name": "web-extension",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "prepare": "husky install",
8
+ "dev": "vite",
9
+ "build": "tsc --noEmit && vite build",
10
+ "preview": "vite preview",
11
+ "up:vite": "pnpm up vite @vitejs/* -L",
12
+ "format": "prettier --write \"**/*.{ts,js,tsx,jsx,json,css,scss,less,json}\"",
13
+ "lint": "tsc --noEmit && eslint **/*.{tsx,ts} && stylelint **/*.{css,scss,less}",
14
+ "lint:fix": "eslint **/*.{tsx,ts} --fix && stylelint **/*.{css,scss,less} --fix",
15
+ "cz": "cz",
16
+ "push": "npm run commit && git push",
17
+ "commit": "git add . && npm run cz"
18
+ },
19
+ "dependencies": {
20
+ "define-zustand": "3.1.1",
21
+ "immer": "10.0.1",
22
+ "ky": "1.1.3",
23
+ "lodash-es": "4.17.21",
24
+ "qs": "6.11.2",
25
+ "react": "18.3.1",
26
+ "react-dom": "18.3.1",
27
+ "zustand": "4.4.1"
28
+ },
29
+ "devDependencies": {
30
+ "1k-types": "1.2.0",
31
+ "@commitlint/cli": "17.6.1",
32
+ "@commitlint/config-conventional": "17.6.1",
33
+ "@commitlint/cz-commitlint": "17.5.0",
34
+ "@crxjs/vite-plugin": "2.0.0-beta.18",
35
+ "@nabla/vite-plugin-eslint": "2.0.2",
36
+ "@types/chrome": "0.0.254",
37
+ "@types/lodash-es": "4.17.7",
38
+ "@types/node": "18.16.0",
39
+ "@types/qs": "6.9.7",
40
+ "@types/react": "18.3.3",
41
+ "@types/react-dom": "18.3.0",
42
+ "@typescript-eslint/eslint-plugin": "7.0.2",
43
+ "@typescript-eslint/parser": "7.0.2",
44
+ "@vitejs/plugin-react": "4.2.1",
45
+ "autoprefixer": "10.4.14",
46
+ "commitizen": "4.3.0",
47
+ "cssnano": "6.0.0",
48
+ "eslint": "8.56.0",
49
+ "eslint-import-resolver-typescript": "3.6.1",
50
+ "eslint-plugin-import": "2.29.1",
51
+ "eslint-plugin-prettier": "5.1.3",
52
+ "eslint-plugin-react": "7.33.2",
53
+ "eslint-plugin-react-hooks": "4.6.0",
54
+ "husky": "8.0.3",
55
+ "inquirer": "^8.1.2",
56
+ "postcss": "8.4.31",
57
+ "postcss-import": "15.1.0",
58
+ "postcss-nesting": "11.2.2",
59
+ "postcss-scss": "4.0.9",
60
+ "prettier": "3.2.5",
61
+ "rimraf": "5.0.1",
62
+ "sass": "1.63.4",
63
+ "stylelint": "16.2.1",
64
+ "stylelint-config-standard-scss": "13.0.0",
65
+ "tailwindcss": "3.3.7",
66
+ "typescript": "5.3.3",
67
+ "vite": "4.5.2",
68
+ "vite-plugin-stylelint": "5.3.1",
69
+ "vite-plugin-svgr": "4.2.0"
70
+ },
71
+ "config": {
72
+ "commitizen": {
73
+ "path": "@commitlint/cz-commitlint"
74
+ }
75
+ }
76
+ }
@@ -5,8 +5,8 @@ import Popup from './popup.container'
5
5
 
6
6
  createRoot(document.getElementById('root') as HTMLElement).render(
7
7
  <StrictMode>
8
- <AppContext.Root>
8
+ <AppContext>
9
9
  <Popup />
10
- </AppContext.Root>
10
+ </AppContext>
11
11
  </StrictMode>
12
12
  )
@@ -1,3 +1,5 @@
1
+ import './popup.css'
2
+
1
3
  export default function Home() {
2
4
  return <div></div>
3
5
  }
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -1,6 +1,8 @@
1
1
  module.exports = {
2
2
  plugins: {
3
3
  'postcss-import': {},
4
+ 'tailwindcss/nesting': 'postcss-nesting',
5
+ tailwindcss: {},
4
6
  autoprefixer: {},
5
7
  ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
6
8
  }
@@ -0,0 +1,14 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ important: '#app',
4
+ content: [
5
+ './index.html',
6
+ './popup/**/*.{ts,tsx,js,jsx}',
7
+ './background/**/*.{ts,tsx,js,jsx}',
8
+ './content_script/**/*.{ts,tsx,js,jsx}'
9
+ ],
10
+ theme: {
11
+ extend: {}
12
+ },
13
+ plugins: []
14
+ }
@@ -1,2 +0,0 @@
1
- export * from './theme.styles'
2
- export * from './theme.components'
@@ -1,7 +0,0 @@
1
- import { FunctionComponent, ReactNode } from 'react'
2
- import { ThemeProvider as ThemeProviderComponent } from 'styled-components'
3
- import { theme } from './theme.styles'
4
-
5
- export const ThemeProvider: FunctionComponent<{ children: ReactNode }> = props => {
6
- return <ThemeProviderComponent theme={theme}>{props.children}</ThemeProviderComponent>
7
- }
@@ -1,8 +0,0 @@
1
- // import original module declarations
2
- import 'styled-components'
3
- import { themeType } from './theme.styles'
4
-
5
- // and extend them!
6
- declare module 'styled-components' {
7
- export interface DefaultTheme extends themeType {}
8
- }
@@ -1,7 +0,0 @@
1
- export const theme = {
2
- color: {
3
- black: '#000'
4
- }
5
- }
6
-
7
- export type themeType = typeof theme
@@ -1,2 +0,0 @@
1
- export * from './theme.styles'
2
- export * from './theme.components'
@@ -1,7 +0,0 @@
1
- import { FunctionComponent, ReactNode } from 'react'
2
- import { ThemeProvider as ThemeProviderComponent } from 'styled-components'
3
- import { theme } from './theme.styles'
4
-
5
- export const ThemeProvider: FunctionComponent<{ children: ReactNode }> = props => {
6
- return <ThemeProviderComponent theme={theme}>{props.children}</ThemeProviderComponent>
7
- }
@@ -1,8 +0,0 @@
1
- // import original module declarations
2
- import 'styled-components'
3
- import { themeType } from './theme.styles'
4
-
5
- // and extend them!
6
- declare module 'styled-components' {
7
- export interface DefaultTheme extends themeType {}
8
- }
@@ -1,7 +0,0 @@
1
- export const theme = {
2
- color: {
3
- black: '#000'
4
- }
5
- }
6
-
7
- export type themeType = typeof theme
@@ -1,2 +0,0 @@
1
- export * from './theme.styles'
2
- export * from './theme.components'
@@ -1,7 +0,0 @@
1
- import { FunctionComponent, ReactNode } from 'react'
2
- import { ThemeProvider as ThemeProviderComponent } from 'styled-components'
3
- import { theme } from './theme.styles'
4
-
5
- export const ThemeProvider: FunctionComponent<{ children: ReactNode }> = props => {
6
- return <ThemeProviderComponent theme={theme}>{props.children}</ThemeProviderComponent>
7
- }
@@ -1,8 +0,0 @@
1
- // import original module declarations
2
- import 'styled-components'
3
- import { themeType } from './theme.styles'
4
-
5
- // and extend them!
6
- declare module 'styled-components' {
7
- export interface DefaultTheme extends themeType {}
8
- }
@@ -1,7 +0,0 @@
1
- export const theme = {
2
- color: {
3
- black: '#000'
4
- }
5
- }
6
-
7
- export type themeType = typeof theme