build
This commit is contained in:
parent
edb56d1916
commit
eac53f8e6e
|
|
@ -1,4 +1,5 @@
|
|||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { PathLike } from 'fs';
|
||||
import { checkFileExistsAndCreateType } from './enum';
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -21,11 +21,15 @@ async function make() {
|
|||
process.exit(1);
|
||||
}
|
||||
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`npm link oak-app-domain`)}`);
|
||||
const isMac = process.platform === 'darwin';
|
||||
const result2 = cross_spawn_1.default.sync(`${isMac ? 'sudo' : ''} npm`, [`link ${process.cwd()}/oak-app-domain`], {
|
||||
const isWin = process.platform === 'win32';
|
||||
const result2 = !isWin ? cross_spawn_1.default.sync('sudo', [`npm link ${process.cwd()}/src/oak-app-domain`], {
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
}) : cross_spawn_1.default.sync('npm', [`link ${process.cwd()}/src/oak-app-domain`], {
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
});
|
||||
console.log(result2);
|
||||
if (result2.status === 0) {
|
||||
(0, tip_style_1.Success)(`${(0, tip_style_1.success)(`link 执行完成`)}`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ function packageJsonContent({ name, version, description, cliversion, cliname, i
|
|||
oakPackageStr = `"${cliname}": "file:../${cliname}",
|
||||
"oak-domain": "file:../oak-domain",
|
||||
"oak-frontend-base": "file:../oak-frontend-base",
|
||||
"oak_external-sdk": "file:../oak-external-sdk",
|
||||
"oak-general-business": "file:../oak-general-business",
|
||||
"oak-memory-tree-store": "file:../oak-memory-tree-store",`;
|
||||
}
|
||||
|
|
@ -15,6 +16,7 @@ function packageJsonContent({ name, version, description, cliversion, cliname, i
|
|||
"oak-domain": "^1.0.0",
|
||||
"oak-frontend-base": "^1.0.0",
|
||||
"oak-general-business": "^1.0.0",
|
||||
"oak_external-sdk": "^1.0.0",
|
||||
"oak-memory-tree-store": "^1.0.0",`;
|
||||
}
|
||||
return `{
|
||||
|
|
@ -33,6 +35,7 @@ function packageJsonContent({ name, version, description, cliversion, cliname, i
|
|||
"@reduxjs/toolkit": "^1.7.2",
|
||||
"crypto-browserify": "^3.12.0",
|
||||
"lodash": "^4.17.21",
|
||||
${oakPackageStr}
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
@ -67,7 +70,6 @@ function packageJsonContent({ name, version, description, cliversion, cliname, i
|
|||
"mini-css-extract-plugin": "^2.5.3",
|
||||
"miniprogram-api-typings": "^3.4.5",
|
||||
"mocha": "^8.2.1",
|
||||
${oakPackageStr}
|
||||
"postcss-less": "^6.0.0",
|
||||
"progress": "^2.0.3",
|
||||
"progress-bar-webpack-plugin": "^2.1.0",
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ const {
|
|||
|
||||
analyzeEntities(`${process.cwd()}/node_modules/oak-general-business/src/entities`);
|
||||
analyzeEntities(`${process.cwd()}/src/entities`);
|
||||
buildSchema(`${process.cwd()}/oak-app-domain`);
|
||||
buildSchema(`${process.cwd()}/src/oak-app-domain`);
|
||||
15
src/make.ts
15
src/make.ts
|
|
@ -31,10 +31,17 @@ export default async function make() {
|
|||
|
||||
Success(`${success(`npm link oak-app-domain`)}`);
|
||||
|
||||
const isMac = process.platform === 'darwin';
|
||||
const result2 = spawn.sync(
|
||||
`${isMac ? 'sudo' : ''} npm`,
|
||||
[`link ${process.cwd()}/oak-app-domain`],
|
||||
const isWin = process.platform === 'win32';
|
||||
const result2 = !isWin ? spawn.sync(
|
||||
'sudo',
|
||||
[`npm link ${process.cwd()}/src/oak-app-domain`],
|
||||
{
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
}
|
||||
) : spawn.sync(
|
||||
'npm',
|
||||
[`link ${process.cwd()}/src/oak-app-domain`],
|
||||
{
|
||||
stdio: 'inherit',
|
||||
shell: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue