@kmlckj/licos-ai-cli 0.0.28 → 0.0.30
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/lib/__templates__/expo/.licosproj/scripts/dev_build.sh +3 -1
- package/lib/__templates__/expo/.licosproj/scripts/dev_run.sh +2 -2
- package/lib/__templates__/expo/.licosproj/scripts/prod_build.sh +2 -2
- package/lib/__templates__/expo/.licosproj/scripts/prod_run.sh +1 -1
- package/lib/__templates__/expo/.licosproj/scripts/server_dev_run.sh +1 -1
- package/lib/__templates__/expo/AGENTS.md +7 -5
- package/lib/__templates__/expo/README.md +5 -5
- package/lib/__templates__/expo/client/package.json +1 -1
- package/lib/__templates__/expo/client/scripts/install-missing-deps.js +11 -6
- package/lib/__templates__/expo/package.json +7 -4
- package/lib/__templates__/expo/pnpm-lock.yaml +5 -5
- package/lib/__templates__/expo/server/package.json +6 -6
- package/lib/__templates__/expo/template.config.js +12 -2
- package/lib/__templates__/nextjs/AGENTS.md +5 -3
- package/lib/__templates__/nextjs/README.md +3 -3
- package/lib/__templates__/nextjs/package.json +15 -13
- package/lib/__templates__/nextjs/pnpm-lock.yaml +21 -278
- package/lib/__templates__/nextjs/scripts/build.sh +1 -1
- package/lib/__templates__/nextjs/scripts/prepare.sh +1 -1
- package/lib/__templates__/nextjs/template.config.js +12 -2
- package/lib/__templates__/nuxt-vue/AGENTS.md +5 -3
- package/lib/__templates__/nuxt-vue/README.md +1 -1
- package/lib/__templates__/nuxt-vue/package.json +16 -12
- package/lib/__templates__/nuxt-vue/pnpm-lock.yaml +11 -406
- package/lib/__templates__/nuxt-vue/scripts/build.sh +1 -1
- package/lib/__templates__/nuxt-vue/scripts/prepare.sh +1 -1
- package/lib/__templates__/taro/.licosproj/scripts/deploy_build.sh +1 -1
- package/lib/__templates__/taro/.licosproj/scripts/dev_build.sh +1 -1
- package/lib/__templates__/taro/.licosproj/scripts/dev_run.sh +1 -1
- package/lib/__templates__/taro/AGENTS.md +7 -6
- package/lib/__templates__/taro/README.md +7 -7
- package/lib/__templates__/taro/package.json +3 -5
- package/lib/__templates__/taro/pnpm-lock.yaml +12 -211
- package/lib/__templates__/taro/server/package.json +1 -1
- package/lib/__templates__/taro/server/src/main.ts +2 -2
- package/lib/__templates__/vite/AGENTS.md +5 -3
- package/lib/__templates__/vite/README.md +7 -7
- package/lib/__templates__/vite/package.json +15 -13
- package/lib/__templates__/vite/pnpm-lock.yaml +5 -422
- package/lib/__templates__/vite/scripts/build.sh +1 -1
- package/lib/__templates__/vite/scripts/prepare.sh +1 -1
- package/lib/__templates__/vite/template.config.js +12 -2
- package/lib/cli.js +18 -10
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
|
|
|
6
6
|
cd "${PROJECT_DIR}"
|
|
7
7
|
|
|
8
8
|
echo "Installing dependencies..."
|
|
9
|
-
pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
|
|
9
|
+
pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
|
|
10
10
|
|
|
11
11
|
echo "Building the Next.js project..."
|
|
12
12
|
pnpm next build
|
|
@@ -6,4 +6,4 @@ PROJECT_DIR="${LICOS_PROJECT_PATH:-${LICOS_WORKSPACE_PATH:-$(pwd)}}"
|
|
|
6
6
|
cd "${PROJECT_DIR}"
|
|
7
7
|
|
|
8
8
|
echo "Installing dependencies..."
|
|
9
|
-
pnpm install --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
|
|
9
|
+
pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --loglevel debug --reporter=append-only
|
|
@@ -71,9 +71,19 @@ const config = {
|
|
|
71
71
|
console.log('⊘ Skipping dependency install in test environment');
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
+
if (_context.options?.skipInstall) {
|
|
75
|
+
console.log('⊘ Skipping dependency install because --skip-install was provided');
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
74
78
|
|
|
75
79
|
const cmd = 'pnpm';
|
|
76
|
-
const args = [
|
|
80
|
+
const args = [
|
|
81
|
+
'install',
|
|
82
|
+
'--registry=https://registry.npmmirror.com',
|
|
83
|
+
'--prefer-frozen-lockfile',
|
|
84
|
+
'--prefer-offline',
|
|
85
|
+
'--reporter=append-only',
|
|
86
|
+
];
|
|
77
87
|
console.log(
|
|
78
88
|
`\nTriggering: ${cmd} ${args.join(' ')} (running in background)`,
|
|
79
89
|
);
|
|
@@ -108,7 +118,7 @@ const config = {
|
|
|
108
118
|
console.log(` Log file: ${logFile}`);
|
|
109
119
|
} catch (error) {
|
|
110
120
|
console.error('✗ Failed to trigger pnpm install:', error);
|
|
111
|
-
console.log(' You can manually run: pnpm install');
|
|
121
|
+
console.log(' You can manually run: pnpm install --registry=https://registry.npmmirror.com');
|
|
112
122
|
}
|
|
113
123
|
},
|
|
114
124
|
};
|
|
@@ -32,11 +32,13 @@
|
|
|
32
32
|
|
|
33
33
|
**仅允许使用 pnpm** 作为包管理器,**严禁使用 npm 或 yarn**。
|
|
34
34
|
**常用命令**:
|
|
35
|
-
- 安装依赖:`pnpm add <package>`
|
|
36
|
-
- 安装开发依赖:`pnpm add -D <package>`
|
|
37
|
-
- 安装所有依赖:`pnpm install`
|
|
35
|
+
- 安装依赖:`pnpm add --registry=https://registry.npmmirror.com <package>`
|
|
36
|
+
- 安装开发依赖:`pnpm add --registry=https://registry.npmmirror.com -D <package>`
|
|
37
|
+
- 安装所有依赖:`pnpm install --registry=https://registry.npmmirror.com`
|
|
38
38
|
- 移除依赖:`pnpm remove <package>`
|
|
39
39
|
|
|
40
|
+
除非用户明确要求,修改代码时不要运行 `pnpm install`、`pnpm dev`、`pnpm build`、`pnpm lint`、`pnpm ts-check`。平台预览和部署会负责依赖安装与启动。
|
|
41
|
+
|
|
40
42
|
## 开发规范
|
|
41
43
|
|
|
42
44
|
- 使用 Tailwind CSS 进行样式开发
|
|
@@ -17,7 +17,7 @@ Nuxt.js full-stack application with server-side API capabilities, Vue 3, and Vit
|
|
|
17
17
|
This project uses pnpm as the package manager. Make sure to install dependencies:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
pnpm install
|
|
20
|
+
pnpm install --registry=https://registry.npmmirror.com
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Development
|
|
@@ -3,16 +3,21 @@
|
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "bash ./scripts/build.sh",
|
|
8
|
-
"dev": "bash ./scripts/dev.sh",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "bash ./scripts/build.sh",
|
|
8
|
+
"dev": "bash ./scripts/dev.sh",
|
|
9
|
+
"ensure:deps": "node -e \"const fs=require('fs'); const bins=['node_modules/.bin/nuxt']; process.exit(bins.every((p)=>fs.existsSync(p)||fs.existsSync(p+'.cmd'))?0:1)\" || pnpm install --registry=https://registry.npmmirror.com --prefer-frozen-lockfile --prefer-offline --reporter=append-only",
|
|
10
|
+
"generate": "nuxt generate",
|
|
11
|
+
"prebuild": "pnpm run ensure:deps",
|
|
12
|
+
"predev": "pnpm run ensure:deps",
|
|
13
|
+
"pregenerate": "pnpm run ensure:deps",
|
|
14
|
+
"preinstall": "node -e \"const ua=process.env.npm_config_user_agent||''; if(!ua.includes('pnpm')){console.error('Use pnpm to install dependencies.'); process.exit(1)}\"",
|
|
15
|
+
"prepreview": "pnpm run ensure:deps",
|
|
16
|
+
"preview": "nuxt preview",
|
|
17
|
+
"start": "bash ./scripts/start.sh"
|
|
13
18
|
},
|
|
14
19
|
"dependencies": {
|
|
15
|
-
"@kmlckj/licos-platform-sdk": "0.6.
|
|
20
|
+
"@kmlckj/licos-platform-sdk": "0.6.2",
|
|
16
21
|
"@nuxt/image": "^1.8.1",
|
|
17
22
|
"nuxt": "^4.3.1",
|
|
18
23
|
"tailwind-merge": "^2.6.0",
|
|
@@ -21,10 +26,9 @@
|
|
|
21
26
|
},
|
|
22
27
|
"devDependencies": {
|
|
23
28
|
"@nuxtjs/tailwindcss": "^6.14.0",
|
|
24
|
-
"@types/node": "^20",
|
|
25
|
-
"autoprefixer": "^10.4.20",
|
|
26
|
-
"
|
|
27
|
-
"postcss": "^8.4.49",
|
|
29
|
+
"@types/node": "^20",
|
|
30
|
+
"autoprefixer": "^10.4.20",
|
|
31
|
+
"postcss": "^8.4.49",
|
|
28
32
|
"tailwindcss": "^3.4.17",
|
|
29
33
|
"typescript": "^5"
|
|
30
34
|
},
|