add public fix and pnpm init asst
This commit is contained in:
@@ -72,6 +72,58 @@ export class AssistantInit extends AssistantConfig {
|
||||
console.log(chalk.green('助手配置文件assistant-config.json创建成功'));
|
||||
}
|
||||
}
|
||||
initPnpm() {
|
||||
const pnpmPath = path.join(this.configDir, 'assistant-app', 'pnpm.yaml');
|
||||
let create = false;
|
||||
if (!checkFileExists(pnpmPath, true)) {
|
||||
create = true;
|
||||
fs.writeFileSync(
|
||||
pnpmPath,
|
||||
`packages:
|
||||
- 'apps/**/*'
|
||||
- 'pages/**/*'
|
||||
`,
|
||||
);
|
||||
console.log(chalk.green('助手 pnpm.yaml 文件创建成功'));
|
||||
}
|
||||
const packagePath = path.join(this.configDir, 'assistant-app', 'package.json');
|
||||
if (!checkFileExists(packagePath, true)) {
|
||||
create = true;
|
||||
fs.writeFileSync(
|
||||
packagePath,
|
||||
`{
|
||||
"name": "assistant-app",
|
||||
"version": "1.0.0",
|
||||
"description": "assistant-app package pnpm, node pkgs projects",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "pm2 start apps/code-center/dist/app.mjs --name code-center",
|
||||
"proxy": "pm2 start apps/page-proxy/dist/app.mjs --name page-proxy"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@kevisual/router": "^0.0.20",
|
||||
"@kevisual/use-config": "^1.0.17",
|
||||
"ioredis": "^5.6.1",
|
||||
"minio": "^8.0.5",
|
||||
"pg": "^8.16.0",
|
||||
"pm2": "^6.0.6",
|
||||
"sequelize": "^6.37.7",
|
||||
"sqlite3": "^5.1.7",
|
||||
"socket.io": "^4.8.1",
|
||||
"dotenv": "^16.5.0"
|
||||
}
|
||||
}
|
||||
`,
|
||||
);
|
||||
console.log(chalk.green('助手 package.json 文件创建成功'));
|
||||
}
|
||||
return {
|
||||
create,
|
||||
};
|
||||
}
|
||||
protected getDefaultInitAssistantConfig() {
|
||||
return {
|
||||
description: '助手配置文件',
|
||||
|
||||
25
assistant/src/services/init/package.json
Normal file
25
assistant/src/services/init/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "assistant-app",
|
||||
"version": "1.0.0",
|
||||
"description": "assistant-app package pnpm, node pkgs projects",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "pm2 start apps/code-center/dist/app.mjs --name code-center",
|
||||
"proxy": "pm2 start apps/page-proxy/dist/app.mjs --name page-proxy"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@kevisual/router": "^0.0.20",
|
||||
"@kevisual/use-config": "^1.0.17",
|
||||
"ioredis": "^5.6.1",
|
||||
"minio": "^8.0.5",
|
||||
"pg": "^8.16.0",
|
||||
"pm2": "^6.0.6",
|
||||
"sequelize": "^6.37.7",
|
||||
"sqlite3": "^5.1.7",
|
||||
"socket.io": "^4.8.1",
|
||||
"dotenv": "^16.5.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user