create-packer 1.45.11 → 1.45.13

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 (34) hide show
  1. package/package.json +1 -1
  2. package/template/web-app/react-rsbuild/.gitignore +5 -0
  3. package/template/web-app/react-rsbuild/eslint.config.js +1 -1
  4. package/template/web-app/react-rsbuild/global.css.ts +3 -3
  5. package/template/web-app/react-rsbuild/main.css +1 -0
  6. package/template/web-app/react-rsbuild/main.tsx +1 -1
  7. package/template/web-app/react-rsbuild/package.json +2 -3
  8. package/template/web-app/react-rsbuild/pages/home/view.css.ts +4 -4
  9. package/template/web-app/react-rsbuild/pages/home/view.tsx +2 -2
  10. package/template/web-app/react-rsbuild/panda.config.ts +18 -0
  11. package/template/web-app/react-rsbuild/postcss.config.cjs +1 -0
  12. package/template/web-app/react-rsbuild/rsbuild.config.ts +0 -2
  13. package/template/web-app/react-rsbuild/tsconfig.json +1 -1
  14. package/template/web-app/react-vite/.gitignore +4 -0
  15. package/template/web-app/react-vite/eslint.config.js +2 -1
  16. package/template/web-app/react-vite/global.css.ts +5 -5
  17. package/template/web-app/react-vite/main.css +1 -0
  18. package/template/web-app/react-vite/main.tsx +4 -4
  19. package/template/web-app/react-vite/package.json +2 -3
  20. package/template/web-app/react-vite/pages/home/view.css.ts +7 -7
  21. package/template/web-app/react-vite/pages/home/view.tsx +10 -10
  22. package/template/web-app/react-vite/panda.config.ts +18 -0
  23. package/template/web-app/react-vite/postcss.config.cjs +1 -0
  24. package/template/web-app/react-vite/tsconfig.json +1 -1
  25. package/template/web-app/react-vite/vite.config.ts +63 -79
  26. package/template/web-app/svelte/package.json +1 -1
  27. package/template/web-app/vue/package.json +1 -1
  28. package/template/web-app/vue-rsbuild/package.json +1 -1
  29. package/template/web-extension/package.json +1 -1
  30. package/template/web-app/react-rsbuild/shared/styles/index.ts +0 -1
  31. package/template/web-app/react-rsbuild/shared/styles/theme.css.ts +0 -3
  32. package/template/web-app/react-vite/.husky/pre-commit +0 -4
  33. package/template/web-app/react-vite/shared/styles/index.ts +0 -1
  34. package/template/web-app/react-vite/shared/styles/theme.css.ts +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packer",
3
- "version": "1.45.11",
3
+ "version": "1.45.13",
4
4
  "main": "index.js",
5
5
  "repository": "https://github.com/kevily/create-packer",
6
6
  "author": "1k <bug_zero@163.com>",
@@ -26,3 +26,8 @@ vite.config.ts.*
26
26
  *.njsproj
27
27
  *.sln
28
28
  *.sw?
29
+
30
+
31
+ ## Panda
32
+ styled-system
33
+ styled-system-studio
@@ -10,7 +10,7 @@ const files = scriptExtensions.map(ext => `**/*.${ext}`)
10
10
 
11
11
  export default tseslint.config([
12
12
  {
13
- ignores: ['**/node_modules/', '**/dist/', '**/.history/', '**/.vscode/']
13
+ ignores: ['**/node_modules/', '**/dist/', '**/.history/', '**/.vscode/', '**/styled-system/',]
14
14
  },
15
15
  eslint.configs.recommended,
16
16
  importPlugin.flatConfigs.recommended,
@@ -1,5 +1,5 @@
1
- import { globalStyle } from '@vanilla-extract/css'
1
+ import { defineGlobalStyles } from '@pandacss/dev'
2
2
 
3
- globalStyle('body', {
4
- margin: 0
3
+ export const globalCss = defineGlobalStyles({
4
+ 'html, body': {}
5
5
  })
@@ -0,0 +1 @@
1
+ @layer reset, base, tokens, recipes, utilities;
@@ -1,4 +1,4 @@
1
1
  import { startApp } from '@/domain/app'
2
- import './global.css'
2
+ import './main.css'
3
3
 
4
4
  startApp()
@@ -4,7 +4,7 @@
4
4
  "version": "0.0.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "prepare": "husky install",
7
+ "prepare": "panda codegen && husky",
8
8
  "dev": "rsbuild dev",
9
9
  "build": "rsbuild build",
10
10
  "build:analyse": "rsbuild build --env-mode analyse",
@@ -20,7 +20,6 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@tanstack/react-query": "5.51.15",
23
- "@vanilla-extract/css": "1.17.4",
24
23
  "axios": "1.7.9",
25
24
  "define-zustand": "3.4.0",
26
25
  "es-toolkit": "1.39.8",
@@ -38,6 +37,7 @@
38
37
  "@commitlint/config-conventional": "17.6.1",
39
38
  "@commitlint/cz-commitlint": "17.5.0",
40
39
  "@eslint/js": "9.15.0",
40
+ "@pandacss/dev": "1.2.0",
41
41
  "@rsbuild/core": "1.5.2",
42
42
  "@rsbuild/plugin-eslint": "1.1.2",
43
43
  "@rsbuild/plugin-react": "1.4.0",
@@ -48,7 +48,6 @@
48
48
  "@types/qs": "6.9.7",
49
49
  "@types/react": "18.3.3",
50
50
  "@types/react-dom": "18.3.0",
51
- "@vanilla-extract/webpack-plugin": "2.3.22",
52
51
  "autoprefixer": "10.4.14",
53
52
  "commitizen": "4.3.0",
54
53
  "cross-env": "7.0.3",
@@ -1,7 +1,7 @@
1
- import { style } from '@vanilla-extract/css'
1
+ import { css } from '@/styled-system/css'
2
2
 
3
- export const root = style({
3
+ export const rootCss = css({
4
4
  display: 'flex',
5
- alignItems: 'center',
6
- justifyContent: 'center'
5
+ justifyContent: 'center',
6
+ alignItems: 'center'
7
7
  })
@@ -1,10 +1,10 @@
1
1
  import { useHomeData } from '@/shared/service'
2
- import * as styles from './view.css'
2
+ import { rootCss } from './view.css'
3
3
 
4
4
  export default function Home() {
5
5
  const { data } = useHomeData()
6
6
 
7
7
  console.log('data', data)
8
8
 
9
- return <div className={styles.root}>sdfs</div>
9
+ return <div className={rootCss}>sdfs</div>
10
10
  }
@@ -0,0 +1,18 @@
1
+ import { defineConfig } from '@pandacss/dev'
2
+ import { globalCss } from './global.css'
3
+
4
+ export default defineConfig({
5
+ // Whether to use css reset
6
+ preflight: true,
7
+ // Where to look for your css declarations
8
+ include: ['**/*.{js,jsx,ts,tsx}'],
9
+ // Files to exclude
10
+ exclude: [],
11
+ // Useful for theme customization
12
+ theme: {
13
+ extend: {}
14
+ },
15
+ // The output directory for your css system
16
+ outdir: 'styled-system',
17
+ globalCss
18
+ })
@@ -3,6 +3,7 @@ module.exports = {
3
3
  'postcss-import': {},
4
4
  'postcss-nesting': {},
5
5
  autoprefixer: {},
6
+ '@pandacss/dev/postcss': {},
6
7
  ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
7
8
  }
8
9
  }
@@ -4,7 +4,6 @@ import { pluginEslint } from '@rsbuild/plugin-eslint'
4
4
  import StylelintWebpackPlugin from 'stylelint-webpack-plugin'
5
5
  import { pluginTypeCheck } from '@rsbuild/plugin-type-check'
6
6
  import { RsdoctorRspackPlugin } from '@rsdoctor/rspack-plugin'
7
- import { VanillaExtractPlugin } from '@vanilla-extract/webpack-plugin'
8
7
  import { pluginSvgr } from '@rsbuild/plugin-svgr'
9
8
  import { createChunks } from './scripts'
10
9
 
@@ -39,7 +38,6 @@ export default defineConfig(({ envMode, command }) => {
39
38
  tools: {
40
39
  rspack: {
41
40
  plugins: [
42
- new VanillaExtractPlugin(),
43
41
  new StylelintWebpackPlugin(),
44
42
  process.env.RSDOCTOR && new RsdoctorRspackPlugin()
45
43
  ]
@@ -22,7 +22,7 @@
22
22
  "@/*": ["./*"]
23
23
  }
24
24
  },
25
- "include": ["**/*.ts", "**/*.tsx"],
25
+ "include": ["**/*.ts", "**/*.tsx", "styled-system"],
26
26
  "exclude": ["scripts", "rsbuild.config.ts"],
27
27
  "references": [
28
28
  {
@@ -26,3 +26,7 @@ vite.config.ts.*
26
26
  *.njsproj
27
27
  *.sln
28
28
  *.sw?
29
+
30
+ ## Panda
31
+ styled-system
32
+ styled-system-studio
@@ -15,8 +15,9 @@ export default tseslint.config([
15
15
  '**/dist/',
16
16
  '**/.history/',
17
17
  '**/.vscode/',
18
+ '**/styled-system/',
18
19
  'vite.config.ts.*',
19
- 'mockUtils.ts'
20
+ 'mockUtils.ts',
20
21
  ]
21
22
  },
22
23
  eslint.configs.recommended,
@@ -1,5 +1,5 @@
1
- import { globalStyle } from '@vanilla-extract/css'
2
-
3
- globalStyle('body', {
4
- margin: 0
5
- })
1
+ import { defineGlobalStyles } from '@pandacss/dev'
2
+
3
+ export const globalCss = defineGlobalStyles({
4
+ 'html, body': {}
5
+ })
@@ -0,0 +1 @@
1
+ @layer reset, base, tokens, recipes, utilities;
@@ -1,4 +1,4 @@
1
- import { startApp } from '@/domain/app'
2
- import './global.css'
3
-
4
- startApp()
1
+ import { startApp } from '@/domain/app'
2
+ import './main.css'
3
+
4
+ startApp()
@@ -4,7 +4,7 @@
4
4
  "version": "0.0.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "prepare": "husky install",
7
+ "prepare": "panda codegen && husky",
8
8
  "dev": "vite",
9
9
  "build": "tsc --noEmit && vite build",
10
10
  "build:analyse": "tsc --noEmit && vite build --mode analyse",
@@ -19,7 +19,6 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@tanstack/react-query": "5.51.15",
22
- "@vanilla-extract/css": "1.17.4",
23
22
  "axios": "1.7.9",
24
23
  "define-zustand": "3.4.0",
25
24
  "es-toolkit": "1.39.8",
@@ -39,11 +38,11 @@
39
38
  "@emotion/babel-plugin": "11.13.5",
40
39
  "@eslint/js": "9.15.0",
41
40
  "@faker-js/faker": "8.4.1",
41
+ "@pandacss/dev": "1.2.0",
42
42
  "@types/node": "18.16.0",
43
43
  "@types/qs": "6.9.7",
44
44
  "@types/react": "18.3.3",
45
45
  "@types/react-dom": "18.3.0",
46
- "@vanilla-extract/vite-plugin": "5.1.1",
47
46
  "@vitejs/plugin-react": "5.0.1",
48
47
  "autoprefixer": "10.4.14",
49
48
  "commitizen": "4.3.0",
@@ -1,7 +1,7 @@
1
- import { style } from '@vanilla-extract/css'
2
-
3
- export const root = style({
4
- display: 'flex',
5
- alignItems: 'center',
6
- justifyContent: 'center'
7
- })
1
+ import { css } from '@/styled-system/css'
2
+
3
+ export const rootCss = css({
4
+ display: 'flex',
5
+ justifyContent: 'center',
6
+ alignItems: 'center'
7
+ })
@@ -1,10 +1,10 @@
1
- import { useHomeData } from '@/shared/service'
2
- import * as styles from './view.css'
3
-
4
- export default function Home() {
5
- const { data } = useHomeData()
6
-
7
- console.log('data', data)
8
-
9
- return <div className={styles.root}>sdfs</div>
10
- }
1
+ import { useHomeData } from '@/shared/service'
2
+ import { rootCss } from './view.css'
3
+
4
+ export default function Home() {
5
+ const { data } = useHomeData()
6
+
7
+ console.log('data', data)
8
+
9
+ return <div className={rootCss}>sdfs</div>
10
+ }
@@ -0,0 +1,18 @@
1
+ import { defineConfig } from '@pandacss/dev'
2
+ import { globalCss } from './global.css'
3
+
4
+ export default defineConfig({
5
+ // Whether to use css reset
6
+ preflight: true,
7
+ // Where to look for your css declarations
8
+ include: ['**/*.{js,jsx,ts,tsx}'],
9
+ // Files to exclude
10
+ exclude: [],
11
+ // Useful for theme customization
12
+ theme: {
13
+ extend: {}
14
+ },
15
+ // The output directory for your css system
16
+ outdir: 'styled-system',
17
+ globalCss
18
+ })
@@ -3,6 +3,7 @@ module.exports = {
3
3
  'postcss-import': {},
4
4
  'postcss-nesting': {},
5
5
  autoprefixer: {},
6
+ '@pandacss/dev/postcss': {},
6
7
  ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {})
7
8
  }
8
9
  }
@@ -22,7 +22,7 @@
22
22
  "@/*": ["./*"]
23
23
  }
24
24
  },
25
- "include": ["**/*.ts", "**/*.tsx"],
25
+ "include": ["**/*.ts", "**/*.tsx", "styled-system"],
26
26
  "exclude": ["scripts", "vite.config.ts"],
27
27
  "references": [
28
28
  {
@@ -1,79 +1,63 @@
1
- import { defineConfig, loadEnv } from 'vite'
2
- import react from '@vitejs/plugin-react'
3
- import svgr from 'vite-plugin-svgr'
4
- import mockDevServer from 'vite-plugin-mock-dev-server'
5
- import checker from 'vite-plugin-checker'
6
- import { visualizer } from 'rollup-plugin-visualizer'
7
- import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'
8
- import { createChunks } from './scripts'
9
-
10
- // https://vitejs.dev/config/
11
- export default defineConfig(({ mode }) => {
12
- const env = loadEnv(mode, process.cwd(), '')
13
- const proxyBaseUrl = env.VITE_BASE_URL + env.VITE_API_HOST
14
- const plugins: any[] = [
15
- vanillaExtractPlugin(),
16
- svgr(),
17
- mockDevServer({
18
- include: ['**/*.mock.{ts,js}']
19
- }),
20
- checker({
21
- enableBuild: false,
22
- typescript: true,
23
- eslint: { useFlatConfig: true, lintCommand: 'eslint', dev: { logLevel: ['error'] } }
24
- }),
25
- react({
26
- babel: {
27
- plugins: [
28
- [
29
- 'babel-plugin-styled-components',
30
- {
31
- ssr: false,
32
- displayName: false,
33
- fileName: false,
34
- transpileTemplateLiterals: false
35
- }
36
- ]
37
- ]
38
- }
39
- })
40
- ]
41
-
42
- if (mode === 'analyse') {
43
- plugins.push(visualizer({ open: true, sourcemap: true, brotliSize: true, gzipSize: true }))
44
- }
45
-
46
- return {
47
- base: env.VITE_BASE_URL,
48
- plugins,
49
- resolve: {
50
- alias: {
51
- '@': __dirname
52
- }
53
- },
54
- esbuild: {
55
- drop: ['production', 'analyse'].includes(mode) ? ['console', 'debugger'] : []
56
- },
57
- build: {
58
- sourcemap: mode === 'analyse',
59
- reportCompressedSize: mode === 'analyse',
60
- rollupOptions: {
61
- output: {
62
- manualChunks: createChunks({
63
- react: ['react', 'react-dom']
64
- })
65
- }
66
- }
67
- },
68
- server: {
69
- host: '0.0.0.0',
70
- proxy: {
71
- [proxyBaseUrl]: {
72
- target: 'http://127.0.0.1',
73
- changeOrigin: true,
74
- rewrite: path => path.replace(proxyBaseUrl, '')
75
- }
76
- }
77
- }
78
- }
79
- })
1
+ import { defineConfig, loadEnv } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+ import svgr from 'vite-plugin-svgr'
4
+ import { mockDevServerPlugin } from 'vite-plugin-mock-dev-server'
5
+ import checker from 'vite-plugin-checker'
6
+ import { visualizer } from 'rollup-plugin-visualizer'
7
+ import { createChunks } from './scripts'
8
+
9
+ // https://vitejs.dev/config/
10
+ export default defineConfig(({ mode }) => {
11
+ const env = loadEnv(mode, process.cwd(), '')
12
+ const proxyBaseUrl = env.VITE_BASE_URL + env.VITE_API_HOST
13
+ const plugins: any[] = [
14
+ svgr(),
15
+ mockDevServerPlugin({
16
+ include: ['**/*.mock.{ts,js}']
17
+ }),
18
+ checker({
19
+ enableBuild: false,
20
+ typescript: true,
21
+ eslint: { useFlatConfig: true, lintCommand: 'eslint', dev: { logLevel: ['error'] } }
22
+ }),
23
+ react()
24
+ ]
25
+
26
+ if (mode === 'analyse') {
27
+ plugins.push(visualizer({ open: true, sourcemap: true, brotliSize: true, gzipSize: true }))
28
+ }
29
+
30
+ return {
31
+ base: env.VITE_BASE_URL,
32
+ plugins,
33
+ resolve: {
34
+ alias: {
35
+ '@': __dirname
36
+ }
37
+ },
38
+ esbuild: {
39
+ drop: ['production', 'analyse'].includes(mode) ? ['console', 'debugger'] : []
40
+ },
41
+ build: {
42
+ sourcemap: mode === 'analyse',
43
+ reportCompressedSize: mode === 'analyse',
44
+ rollupOptions: {
45
+ output: {
46
+ manualChunks: createChunks({
47
+ react: ['react', 'react-dom']
48
+ })
49
+ }
50
+ }
51
+ },
52
+ server: {
53
+ host: '0.0.0.0',
54
+ proxy: {
55
+ [proxyBaseUrl]: {
56
+ target: 'http://127.0.0.1',
57
+ changeOrigin: true,
58
+ rewrite: path => path.replace(proxyBaseUrl, '')
59
+ }
60
+ }
61
+ }
62
+ }
63
+ })
@@ -4,7 +4,7 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "prepare": "husky install",
7
+ "prepare": "husky",
8
8
  "dev": "cross-env MODE=development vite",
9
9
  "build": "npm run check && npm run lint && cross-env MODE=production vite build",
10
10
  "build:analyse": "npm run check && npm run lint && vite build --mode analyse",
@@ -4,7 +4,7 @@
4
4
  "version": "0.0.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "prepare": "husky install",
7
+ "prepare": "husky",
8
8
  "dev": "vite",
9
9
  "build": "vue-tsc --noEmit && vite build",
10
10
  "build:analyse": "tsc --noEmit && vite build --mode analyse",
@@ -4,7 +4,7 @@
4
4
  "version": "0.0.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "prepare": "husky install",
7
+ "prepare": "husky",
8
8
  "dev": "rsbuild dev",
9
9
  "build": "rsbuild build",
10
10
  "build:analyse": "rsbuild build --env-mode analyse",
@@ -4,7 +4,7 @@
4
4
  "version": "0.0.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "prepare": "husky install",
7
+ "prepare": "husky",
8
8
  "dev": "wxt",
9
9
  "dev:firefox": "wxt -b firefox",
10
10
  "build": "wxt build",
@@ -1 +0,0 @@
1
- export * from './theme.css'
@@ -1,3 +0,0 @@
1
- import { createTheme } from '@vanilla-extract/css'
2
-
3
- export const [themeClass, themeVars] = createTheme({})
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- npm run lint
@@ -1 +0,0 @@
1
- export * from './theme.css'
@@ -1,3 +0,0 @@
1
- import { createTheme } from '@vanilla-extract/css'
2
-
3
- export const [themeClass, themeVars] = createTheme({})