@coze-arch/cli 0.0.1-beta.5

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 (126) hide show
  1. package/README.md +142 -0
  2. package/bin/main +2 -0
  3. package/lib/__templates__/expo/.coze +7 -0
  4. package/lib/__templates__/expo/.cozeproj/scripts/deploy_build.sh +109 -0
  5. package/lib/__templates__/expo/.cozeproj/scripts/deploy_run.sh +257 -0
  6. package/lib/__templates__/expo/README.md +13 -0
  7. package/lib/__templates__/expo/_gitignore +11 -0
  8. package/lib/__templates__/expo/app.json +63 -0
  9. package/lib/__templates__/expo/babel.config.js +9 -0
  10. package/lib/__templates__/expo/client/app/(tabs)/_layout.tsx +43 -0
  11. package/lib/__templates__/expo/client/app/(tabs)/home.tsx +1 -0
  12. package/lib/__templates__/expo/client/app/(tabs)/index.tsx +7 -0
  13. package/lib/__templates__/expo/client/app/+not-found.tsx +79 -0
  14. package/lib/__templates__/expo/client/app/_layout.tsx +33 -0
  15. package/lib/__templates__/expo/client/assets/fonts/SpaceMono-Regular.ttf +0 -0
  16. package/lib/__templates__/expo/client/assets/images/adaptive-icon.png +0 -0
  17. package/lib/__templates__/expo/client/assets/images/default-avatar.png +0 -0
  18. package/lib/__templates__/expo/client/assets/images/favicon.png +0 -0
  19. package/lib/__templates__/expo/client/assets/images/icon.png +0 -0
  20. package/lib/__templates__/expo/client/assets/images/partial-react-logo.png +0 -0
  21. package/lib/__templates__/expo/client/assets/images/react-logo.png +0 -0
  22. package/lib/__templates__/expo/client/assets/images/react-logo@2x.png +0 -0
  23. package/lib/__templates__/expo/client/assets/images/react-logo@3x.png +0 -0
  24. package/lib/__templates__/expo/client/assets/images/splash-icon.png +0 -0
  25. package/lib/__templates__/expo/client/components/Screen.tsx +330 -0
  26. package/lib/__templates__/expo/client/components/SmartDateInput.tsx +238 -0
  27. package/lib/__templates__/expo/client/constants/theme.ts +118 -0
  28. package/lib/__templates__/expo/client/contexts/AuthContext.tsx +142 -0
  29. package/lib/__templates__/expo/client/hooks/useColorScheme.ts +1 -0
  30. package/lib/__templates__/expo/client/hooks/useTheme.ts +13 -0
  31. package/lib/__templates__/expo/client/index.js +11 -0
  32. package/lib/__templates__/expo/client/screens/home/index.tsx +54 -0
  33. package/lib/__templates__/expo/client/screens/home/styles.ts +332 -0
  34. package/lib/__templates__/expo/client/scripts/install-missing-deps.js +80 -0
  35. package/lib/__templates__/expo/client/utils/index.ts +55 -0
  36. package/lib/__templates__/expo/eslint-formatter-simple.mjs +49 -0
  37. package/lib/__templates__/expo/eslint.config.mjs +98 -0
  38. package/lib/__templates__/expo/metro.config.js +53 -0
  39. package/lib/__templates__/expo/package.json +100 -0
  40. package/lib/__templates__/expo/pnpm-lock.yaml +13978 -0
  41. package/lib/__templates__/expo/src/index.ts +12 -0
  42. package/lib/__templates__/expo/template.config.js +49 -0
  43. package/lib/__templates__/expo/tsconfig.json +24 -0
  44. package/lib/__templates__/nextjs/.coze +11 -0
  45. package/lib/__templates__/nextjs/.vscode/settings.json +121 -0
  46. package/lib/__templates__/nextjs/README.md +36 -0
  47. package/lib/__templates__/nextjs/_gitignore +99 -0
  48. package/lib/__templates__/nextjs/_npmrc +22 -0
  49. package/lib/__templates__/nextjs/eslint.config.mjs +18 -0
  50. package/lib/__templates__/nextjs/next-env.d.ts +6 -0
  51. package/lib/__templates__/nextjs/next.config.ts +7 -0
  52. package/lib/__templates__/nextjs/package.json +32 -0
  53. package/lib/__templates__/nextjs/pnpm-lock.yaml +4061 -0
  54. package/lib/__templates__/nextjs/postcss.config.mjs +7 -0
  55. package/lib/__templates__/nextjs/public/file.svg +1 -0
  56. package/lib/__templates__/nextjs/public/globe.svg +1 -0
  57. package/lib/__templates__/nextjs/public/next.svg +1 -0
  58. package/lib/__templates__/nextjs/public/vercel.svg +1 -0
  59. package/lib/__templates__/nextjs/public/window.svg +1 -0
  60. package/lib/__templates__/nextjs/scripts/build.sh +14 -0
  61. package/lib/__templates__/nextjs/scripts/dev.sh +51 -0
  62. package/lib/__templates__/nextjs/scripts/start.sh +15 -0
  63. package/lib/__templates__/nextjs/src/app/favicon.ico +0 -0
  64. package/lib/__templates__/nextjs/src/app/globals.css +26 -0
  65. package/lib/__templates__/nextjs/src/app/layout.tsx +34 -0
  66. package/lib/__templates__/nextjs/src/app/page.tsx +66 -0
  67. package/lib/__templates__/nextjs/template.config.js +55 -0
  68. package/lib/__templates__/nextjs/tsconfig.json +34 -0
  69. package/lib/__templates__/react-rsbuild/.coze +11 -0
  70. package/lib/__templates__/react-rsbuild/.vscode/settings.json +121 -0
  71. package/lib/__templates__/react-rsbuild/README.md +61 -0
  72. package/lib/__templates__/react-rsbuild/_gitignore +97 -0
  73. package/lib/__templates__/react-rsbuild/_npmrc +22 -0
  74. package/lib/__templates__/react-rsbuild/package.json +31 -0
  75. package/lib/__templates__/react-rsbuild/pnpm-lock.yaml +997 -0
  76. package/lib/__templates__/react-rsbuild/rsbuild.config.ts +13 -0
  77. package/lib/__templates__/react-rsbuild/scripts/build.sh +14 -0
  78. package/lib/__templates__/react-rsbuild/scripts/dev.sh +51 -0
  79. package/lib/__templates__/react-rsbuild/scripts/start.sh +15 -0
  80. package/lib/__templates__/react-rsbuild/src/App.tsx +60 -0
  81. package/lib/__templates__/react-rsbuild/src/index.css +21 -0
  82. package/lib/__templates__/react-rsbuild/src/index.html +12 -0
  83. package/lib/__templates__/react-rsbuild/src/index.tsx +16 -0
  84. package/lib/__templates__/react-rsbuild/tailwind.config.js +9 -0
  85. package/lib/__templates__/react-rsbuild/template.config.js +54 -0
  86. package/lib/__templates__/react-rsbuild/tsconfig.json +17 -0
  87. package/lib/__templates__/rsbuild/.coze +11 -0
  88. package/lib/__templates__/rsbuild/.vscode/settings.json +7 -0
  89. package/lib/__templates__/rsbuild/README.md +61 -0
  90. package/lib/__templates__/rsbuild/_gitignore +97 -0
  91. package/lib/__templates__/rsbuild/_npmrc +22 -0
  92. package/lib/__templates__/rsbuild/package.json +24 -0
  93. package/lib/__templates__/rsbuild/pnpm-lock.yaml +888 -0
  94. package/lib/__templates__/rsbuild/rsbuild.config.ts +12 -0
  95. package/lib/__templates__/rsbuild/scripts/build.sh +14 -0
  96. package/lib/__templates__/rsbuild/scripts/dev.sh +51 -0
  97. package/lib/__templates__/rsbuild/scripts/start.sh +15 -0
  98. package/lib/__templates__/rsbuild/src/index.css +21 -0
  99. package/lib/__templates__/rsbuild/src/index.html +12 -0
  100. package/lib/__templates__/rsbuild/src/index.ts +5 -0
  101. package/lib/__templates__/rsbuild/src/main.ts +65 -0
  102. package/lib/__templates__/rsbuild/tailwind.config.js +9 -0
  103. package/lib/__templates__/rsbuild/template.config.js +54 -0
  104. package/lib/__templates__/rsbuild/tsconfig.json +16 -0
  105. package/lib/__templates__/templates.json +100 -0
  106. package/lib/__templates__/vite/.coze +11 -0
  107. package/lib/__templates__/vite/.vscode/settings.json +7 -0
  108. package/lib/__templates__/vite/README.md +61 -0
  109. package/lib/__templates__/vite/_gitignore +66 -0
  110. package/lib/__templates__/vite/_npmrc +22 -0
  111. package/lib/__templates__/vite/index.html +13 -0
  112. package/lib/__templates__/vite/package.json +24 -0
  113. package/lib/__templates__/vite/pnpm-lock.yaml +1249 -0
  114. package/lib/__templates__/vite/postcss.config.js +6 -0
  115. package/lib/__templates__/vite/scripts/build.sh +14 -0
  116. package/lib/__templates__/vite/scripts/dev.sh +51 -0
  117. package/lib/__templates__/vite/scripts/start.sh +15 -0
  118. package/lib/__templates__/vite/src/index.css +21 -0
  119. package/lib/__templates__/vite/src/index.ts +5 -0
  120. package/lib/__templates__/vite/src/main.ts +65 -0
  121. package/lib/__templates__/vite/tailwind.config.js +9 -0
  122. package/lib/__templates__/vite/template.config.js +55 -0
  123. package/lib/__templates__/vite/tsconfig.json +16 -0
  124. package/lib/__templates__/vite/vite.config.ts +15 -0
  125. package/lib/cli.js +1575 -0
  126. package/package.json +70 -0
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from '@rsbuild/core';
2
+ import { pluginReact } from '@rsbuild/plugin-react';
3
+ import { pluginTailwindCSS } from 'rsbuild-plugin-tailwindcss';
4
+
5
+ export default defineConfig({
6
+ plugins: [pluginReact(), pluginTailwindCSS()],
7
+ server: {
8
+ port: <%= port %>,
9
+ },
10
+ html: {
11
+ template: './src/index.html',
12
+ },
13
+ });
@@ -0,0 +1,14 @@
1
+ #!/bin/bash
2
+ set -Eeuo pipefail
3
+
4
+ COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
5
+
6
+ cd "${COZE_WORKSPACE_PATH}"
7
+
8
+ echo "Installing dependencies..."
9
+ pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
10
+
11
+ echo "Building the project..."
12
+ npx rsbuild build
13
+
14
+ echo "Build completed successfully!"
@@ -0,0 +1,51 @@
1
+ #!/bin/bash
2
+ set -Eeuo pipefail
3
+
4
+ PORT=<%= port %>
5
+ COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
6
+
7
+ cd "${COZE_WORKSPACE_PATH}"
8
+
9
+ kill_port_if_listening() {
10
+ local pids
11
+
12
+ # Check if lsof is available (macOS/BSD) or ss (Linux)
13
+ if command -v lsof >/dev/null 2>&1; then
14
+ # macOS/BSD using lsof
15
+ pids=$(lsof -ti:${PORT} 2>/dev/null || true)
16
+ elif command -v ss >/dev/null 2>&1; then
17
+ # Linux using ss
18
+ pids=$(ss -H -lntp 2>/dev/null | awk -v port="${PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
19
+ else
20
+ echo "Warning: neither lsof nor ss found, cannot check port ${PORT}"
21
+ return
22
+ fi
23
+
24
+ if [[ -z "${pids}" ]]; then
25
+ echo "Port ${PORT} is free."
26
+ return
27
+ fi
28
+
29
+ echo "Port ${PORT} in use by PIDs: ${pids} (SIGKILL)"
30
+ echo "${pids}" | xargs -I {} kill -9 {}
31
+ sleep 1
32
+
33
+ # Verify port is cleared
34
+ if command -v lsof >/dev/null 2>&1; then
35
+ pids=$(lsof -ti:${PORT} 2>/dev/null || true)
36
+ elif command -v ss >/dev/null 2>&1; then
37
+ pids=$(ss -H -lntp 2>/dev/null | awk -v port="${PORT}" '$4 ~ ":"port"$"' | grep -o 'pid=[0-9]*' | cut -d= -f2 | paste -sd' ' - || true)
38
+ fi
39
+
40
+ if [[ -n "${pids}" ]]; then
41
+ echo "Warning: port ${PORT} still busy after SIGKILL, PIDs: ${pids}"
42
+ else
43
+ echo "Port ${PORT} cleared."
44
+ fi
45
+ }
46
+
47
+ echo "Clearing port ${PORT} before start."
48
+ kill_port_if_listening
49
+ echo "Starting HTTP service on port ${PORT} for dev..."
50
+
51
+ npx rsbuild dev --port $PORT
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+ set -Eeuo pipefail
3
+
4
+ COZE_WORKSPACE_PATH="${COZE_WORKSPACE_PATH:-$(pwd)}"
5
+ PORT=<%= port %>
6
+ DEPLOY_RUN_PORT="${DEPLOY_RUN_PORT:-$PORT}"
7
+
8
+ start_service() {
9
+ cd "${COZE_WORKSPACE_PATH}"
10
+ echo "Starting HTTP service on port ${DEPLOY_RUN_PORT} for deploy..."
11
+ npx rsbuild preview --port $DEPLOY_RUN_PORT
12
+ }
13
+
14
+ echo "Starting HTTP service on port ${DEPLOY_RUN_PORT} for deploy..."
15
+ start_service
@@ -0,0 +1,60 @@
1
+ const App: React.FC = () => {
2
+ return (
3
+ <div className="flex min-h-screen items-center justify-center bg-white text-black transition-colors duration-300 dark:bg-black dark:text-white">
4
+ {/* 主容器 */}
5
+ <main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between px-16 py-32 sm:items-start">
6
+ {/* 头部:Logo 和 产品名称 */}
7
+ <div className="flex items-center gap-3">
8
+ <img
9
+ className="dark:invert"
10
+ src="https://lf3-static.bytednsdoc.com/obj/eden-cn/hkpzboz/coze_logo.png"
11
+ alt="扣子编程 Logo"
12
+ width={40}
13
+ height={40}
14
+ style={{ width: '40px', height: '40px', objectFit: 'contain' }}
15
+ />
16
+ <span className="text-xl font-bold tracking-tight text-black dark:text-zinc-50">
17
+ 扣子编程
18
+ </span>
19
+ </div>
20
+
21
+ {/* 中间内容区:主标题和副标题 */}
22
+ <div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
23
+ <h1 className="max-w-xl text-4xl font-semibold leading-tight tracking-tight text-black dark:text-zinc-50">
24
+ 扣子编程,你的 AI 开发伙伴已就位
25
+ </h1>
26
+ <p className="max-w-2xl text-lg leading-8 text-zinc-600 dark:text-zinc-400">
27
+ 当前是空白入口文件,项目正在开发中,请稍候...
28
+ <br />
29
+ 开发完成后界面将自动更新。如未自动更新成功,可以手动点击右上角刷新或重启按钮查看效果。
30
+ </p>
31
+ </div>
32
+
33
+ {/* 底部按钮区 */}
34
+ <div className="flex w-full flex-col gap-4 text-base font-medium sm:w-auto sm:flex-row">
35
+ {/* 按钮 1:前往首页 */}
36
+ <a
37
+ className="flex h-12 w-full min-w-[160px] items-center justify-center gap-2 rounded-full bg-black px-8 text-white transition-colors hover:bg-zinc-800 dark:bg-white dark:text-black dark:hover:bg-zinc-200 md:w-auto"
38
+ href="https://code.coze.cn/"
39
+ target="_blank"
40
+ rel="noopener noreferrer"
41
+ >
42
+ 前往首页
43
+ </a>
44
+
45
+ {/* 按钮 2:查看文档 */}
46
+ <a
47
+ className="flex h-12 w-full min-w-[160px] items-center justify-center rounded-full border border-solid border-black/[.08] px-8 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-auto"
48
+ href="https://docs.coze.cn/"
49
+ target="_blank"
50
+ rel="noopener noreferrer"
51
+ >
52
+ 查看文档
53
+ </a>
54
+ </div>
55
+ </main>
56
+ </div>
57
+ );
58
+ };
59
+
60
+ export default App;
@@ -0,0 +1,21 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ :root {
6
+ --background: #ffffff;
7
+ --foreground: #171717;
8
+ }
9
+
10
+ @media (prefers-color-scheme: dark) {
11
+ :root {
12
+ --background: #0a0a0a;
13
+ --foreground: #ededed;
14
+ }
15
+ }
16
+
17
+ body {
18
+ background: var(--background);
19
+ color: var(--foreground);
20
+ font-family: Arial, Helvetica, sans-serif;
21
+ }
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta name="description" content="扣子编程,你的 AI 开发伙伴已就位" />
7
+ <title>扣子编程 - AI 开发伙伴</title>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ </body>
12
+ </html>
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+
3
+ import ReactDOM from 'react-dom/client';
4
+
5
+ import App from './App';
6
+ import './index.css';
7
+
8
+ const root = ReactDOM.createRoot(
9
+ document.getElementById('root') as HTMLElement,
10
+ );
11
+
12
+ root.render(
13
+ <React.StrictMode>
14
+ <App />
15
+ </React.StrictMode>,
16
+ );
@@ -0,0 +1,9 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default {
3
+ content: ['./src/**/*.{html,js,ts,jsx,tsx}'],
4
+ darkMode: 'media',
5
+ theme: {
6
+ extend: {},
7
+ },
8
+ plugins: [],
9
+ };
@@ -0,0 +1,54 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+ export const paramsSchema = {
11
+ type: 'object',
12
+ properties: {
13
+ appName: {
14
+ type: 'string',
15
+ minLength: 1,
16
+ pattern: '^[a-z0-9-]+$',
17
+ description:
18
+ 'Application name (lowercase, alphanumeric and hyphens only)',
19
+ },
20
+ port: {
21
+ type: 'number',
22
+ default: 3000,
23
+ minimum: 1024,
24
+ maximum: 65535,
25
+ description: 'Development server port',
26
+ },
27
+ },
28
+ required: [],
29
+ additionalProperties: false,
30
+ };
31
+
32
+ const config = {
33
+ paramsSchema,
34
+
35
+ // 显式定义默认参数,确保在渲染时可用
36
+ defaultParams: {
37
+ port: 3000,
38
+ appName: 'app',
39
+ },
40
+
41
+ onBeforeRender: async context => {
42
+ console.log(`Creating React + Rsbuild project: ${context.appName}`);
43
+ return context;
44
+ },
45
+
46
+ onAfterRender: async (context, outputPath) => {
47
+ console.log(`\nProject created at: ${outputPath}`);
48
+ console.log(`\nConfiguration:`);
49
+ console.log(` - TypeScript: enabled`);
50
+ console.log(` - Port: ${context.port}`);
51
+ },
52
+ };
53
+
54
+ export default config;
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "jsx": "react-jsx",
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "noEmit": true
15
+ },
16
+ "include": ["src"]
17
+ }
@@ -0,0 +1,11 @@
1
+ [project]
2
+ requires = ["nodejs-24"]
3
+
4
+ [dev]
5
+ run = ["npm", "run", "dev"]
6
+ deps = ["git"] # -> apt install git
7
+
8
+ [deploy]
9
+ build = ["npm", "run", "build"]
10
+ run = ["npm", "run", "start"]
11
+ deps = ["git"] # -> apt install git
@@ -0,0 +1,7 @@
1
+ {
2
+ "editor.formatOnSave": true,
3
+ "editor.codeActionsOnSave": {
4
+ "source.fixAll.eslint": "explicit"
5
+ },
6
+ "typescript.tsdk": "node_modules/typescript/lib"
7
+ }
@@ -0,0 +1,61 @@
1
+ # <%= appName %>
2
+
3
+ Vanilla TypeScript application built with Rsbuild.
4
+
5
+ ## Getting Started
6
+
7
+ Install dependencies:
8
+
9
+ ```bash
10
+ npm install
11
+ ```
12
+
13
+ Start development server:
14
+
15
+ ```bash
16
+ npm run dev
17
+ ```
18
+
19
+ Or use coze-coding CLI:
20
+
21
+ ```bash
22
+ coze-coding dev
23
+ ```
24
+
25
+ ## Build
26
+
27
+ Build for production:
28
+
29
+ ```bash
30
+ npm run build
31
+ ```
32
+
33
+ Or:
34
+
35
+ ```bash
36
+ coze-coding build
37
+ ```
38
+
39
+ ## Preview
40
+
41
+ Preview production build:
42
+
43
+ ```bash
44
+ npm run preview
45
+ ```
46
+
47
+ Or:
48
+
49
+ ```bash
50
+ coze-coding start
51
+ ```
52
+
53
+ ## Configuration
54
+
55
+ - Dev Server Port: <%= port %>
56
+
57
+ ## Tech Stack
58
+
59
+ - TypeScript
60
+ - Rsbuild
61
+ - HTML + CSS
@@ -0,0 +1,97 @@
1
+ # Dependencies
2
+ node_modules/
3
+ .pnp
4
+ .pnp.js
5
+
6
+ # Production build
7
+ dist/
8
+ build/
9
+ out/
10
+ .next/
11
+ .rsbuild/
12
+
13
+ # Testing
14
+ coverage/
15
+ *.lcov
16
+ .nyc_output
17
+
18
+ # Environment variables
19
+ .env
20
+ .env.local
21
+ .env.development.local
22
+ .env.test.local
23
+ .env.production.local
24
+
25
+ # Logs
26
+ logs/
27
+ *.log
28
+ npm-debug.log*
29
+ yarn-debug.log*
30
+ yarn-error.log*
31
+ pnpm-debug.log*
32
+ lerna-debug.log*
33
+
34
+ # Runtime data
35
+ pids
36
+ *.pid
37
+ *.seed
38
+ *.pid.lock
39
+
40
+ # Diagnostic reports
41
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
42
+
43
+ # Cache
44
+ .cache/
45
+ .parcel-cache/
46
+ .eslintcache
47
+ .stylelintcache
48
+ .npm
49
+ .yarn/cache
50
+ .yarn/unplugged
51
+ .yarn/build-state.yml
52
+ .yarn/install-state.gz
53
+
54
+ # Editor directories and files
55
+ .vscode/*
56
+ !.vscode/extensions.json
57
+ !.vscode/settings.json
58
+ .idea/
59
+ *.suo
60
+ *.ntvs*
61
+ *.njsproj
62
+ *.sln
63
+ *.sw?
64
+ *.swp
65
+ *.swo
66
+ *~
67
+
68
+ # OS files
69
+ .DS_Store
70
+ .DS_Store?
71
+ ._*
72
+ .Spotlight-V100
73
+ .Trashes
74
+ ehthumbs.db
75
+ Thumbs.db
76
+ Desktop.ini
77
+
78
+ # Temporary files
79
+ *.tmp
80
+ *.temp
81
+ .tmp/
82
+ .temp/
83
+
84
+ # Optional files
85
+ *.tgz
86
+ *.gz
87
+ *.zip
88
+ *.tar
89
+
90
+ # TypeScript
91
+ *.tsbuildinfo
92
+
93
+ # Misc
94
+ .vercel
95
+ .turbo
96
+
97
+ .coze-logs
@@ -0,0 +1,22 @@
1
+ registry=https://registry.npmjs.org
2
+
3
+ strictStorePkgContentCheck=false
4
+ verifyStoreIntegrity=false
5
+
6
+ # 网络优化
7
+ network-concurrency=16
8
+ fetch-retries=3
9
+ fetch-timeout=60000
10
+
11
+ # 严格使用 peer dependencies
12
+ strict-peer-dependencies=false
13
+
14
+ # 自动生成 lockfile
15
+ auto-install-peers=true
16
+
17
+ # lockfile 配置
18
+ lockfile=true
19
+ prefer-frozen-lockfile=true
20
+
21
+ # 如果 lockfile 存在但过期,更新而不是失败
22
+ resolution-mode=highest
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "<%= appName %>",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "description": "Vanilla TypeScript application with Rsbuild (HTML + CSS + TS)",
6
+ "scripts": {
7
+ "build": "bash ./scripts/build.sh",
8
+ "dev": "bash ./scripts/dev.sh",
9
+ "preinstall": "npx only-allow pnpm",
10
+ "lint": "eslint",
11
+ "start": "bash ./scripts/start.sh"
12
+ },
13
+ "devDependencies": {
14
+ "@rsbuild/core": "^1.1.0",
15
+ "only-allow": "^1.2.2",
16
+ "rsbuild-plugin-tailwindcss": "^0.2.1",
17
+ "tailwindcss": "^3.4.17",
18
+ "typescript": "^5.6.0"
19
+ },
20
+ "packageManager": "pnpm@9.0.0",
21
+ "engines": {
22
+ "pnpm": ">=9.0.0"
23
+ }
24
+ }