微调模版package.json生成

This commit is contained in:
Wang Kejun 2023-11-01 15:03:49 +08:00
parent 8c3801c2bf
commit cfba576665
2 changed files with 6 additions and 4 deletions

View File

@ -24,7 +24,7 @@ function packageJsonContent({ name, version, description, cliVersion, cliName, c
"oak-memory-tree-store": "^2.1.0",`;
oakDevDependencyStr = `"${cliName}": "^${cliVersion}",`;
}
const serverInitScript = isDev ? "cross-env NODE_ENV=development cross-env OAK_PLATFORM=server ts-node scripts/initServer.js" : "cross-env OAK_PLATFORM=server ts-node scripts/initServer.js";
const serverInitScript = isDev ? "cross-env OAK_PLATFORM=server ts-node scripts/initServer.js" : "cross-env OAK_PLATFORM=server ts-node scripts/initServer.js";
const serverStartScript = isDev ? "cross-env NODE_ENV=development cross-env OAK_PLATFORM=server ts-node scripts/startServer.js" : "cross-env OAK_PLATFORM=server ts-node scripts/startServer.js";
return `{
"name": "${name}",
@ -44,7 +44,7 @@ function packageJsonContent({ name, version, description, cliVersion, cliName, c
"build:web": "${cliBinName} build --target web --mode production",
"build-analyze:web": "${cliBinName} build --target web --mode production --analyze",
"build-sourcemap-analyze:web": "${cliBinName} build --target web --mode production --sourcemap --analyze",
"build": "tsc",
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && npm run copy-config-json",
"server:init": "${serverInitScript}",
"server:start": "${serverStartScript}",
"postinstall": "npm run make:domain"
@ -178,6 +178,7 @@ function packageJsonContent({ name, version, description, cliVersion, cliName, c
"terser-webpack-plugin": "^5.2.5",
"ts-loader": "^9.3.0",
"ts-node": "^10.8.1",
"tsc-alias": "^1.8.2",
"tslib": "^2.4.0",
"typescript": "^4.7.3",
"ui-extract-webpack-plugin": "^1.0.0",

View File

@ -31,7 +31,7 @@ export function packageJsonContent({
oakDevDependencyStr = `"${cliName}": "^${cliVersion}",`
}
const serverInitScript = isDev ? "cross-env NODE_ENV=development cross-env OAK_PLATFORM=server ts-node scripts/initServer.js" : "cross-env OAK_PLATFORM=server ts-node scripts/initServer.js";
const serverInitScript = isDev ? "cross-env OAK_PLATFORM=server ts-node scripts/initServer.js" : "cross-env OAK_PLATFORM=server ts-node scripts/initServer.js";
const serverStartScript = isDev ? "cross-env NODE_ENV=development cross-env OAK_PLATFORM=server ts-node scripts/startServer.js" : "cross-env OAK_PLATFORM=server ts-node scripts/startServer.js";
return `{
"name": "${name}",
@ -51,7 +51,7 @@ export function packageJsonContent({
"build:web": "${cliBinName} build --target web --mode production",
"build-analyze:web": "${cliBinName} build --target web --mode production --analyze",
"build-sourcemap-analyze:web": "${cliBinName} build --target web --mode production --sourcemap --analyze",
"build": "tsc",
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && npm run copy-config-json",
"server:init": "${serverInitScript}",
"server:start": "${serverStartScript}",
"postinstall": "npm run make:domain"
@ -185,6 +185,7 @@ export function packageJsonContent({
"terser-webpack-plugin": "^5.2.5",
"ts-loader": "^9.3.0",
"ts-node": "^10.8.1",
"tsc-alias": "^1.8.2",
"tslib": "^2.4.0",
"typescript": "^4.7.3",
"ui-extract-webpack-plugin": "^1.0.0",