Comparing version 2.1.36 to 2.1.38
{ | ||
"name": "@vmm/cli", | ||
"version": "2.1.36", | ||
"version": "2.1.38", | ||
"description": "vmm cli interface", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -44,9 +44,15 @@ const fs = require('fs-extra') | ||
// 生成定义文件 | ||
execSync(`./node_modules/.bin/tsc -d --resolveJsonModule --emitDeclarationOnly --declarationDir ./dist/types ./src/exports/index.ts`, { | ||
env: { | ||
"NODE_ENV": "production", | ||
"PATH": process.env['PATH'] | ||
}, | ||
// 拷贝 api 文件 | ||
execSync(`mkdir -p ./dist/api && cp -R ./src/api ./dist/`, { | ||
env: {}, | ||
stdio: 'inherit' | ||
}) | ||
// execSync(`./node_modules/.bin/tsc -d --resolveJsonModule --emitDeclarationOnly --declarationDir ./dist/types ./src/exports/index.ts`, { | ||
// env: { | ||
// "NODE_ENV": "production", | ||
// "PATH": process.env['PATH'] | ||
// }, | ||
// stdio: 'inherit' | ||
// }) | ||
// 生成发布版的packages.json | ||
@@ -60,3 +66,2 @@ const releasePkg = { | ||
moduleType: "service", | ||
api: "types/src/index.d.ts", | ||
extra: {} | ||
@@ -63,0 +68,0 @@ } |
@@ -11,3 +11,22 @@ const fse = require('fs-extra') | ||
async function createService(name) { | ||
console.log('create node service project:', name) | ||
// 检查当前目录非空 | ||
if (!isCurDirEmpty()) { | ||
throw Error('cur dir MUST empty') | ||
} | ||
// 拷贝模板 | ||
fse.copySync(path.join(__dirname, '../templates/service'), '.') | ||
// 更改名称 | ||
const pkg = JSON.parse(fse.readFileSync('./package.json')) | ||
pkg.name = name | ||
pkg.version = '1.0.0' | ||
fse.writeFileSync('./package.json', JSON.stringify(pkg, null, 2)) | ||
// 更新版本 | ||
// await updateHtml({}) | ||
// 获取npm包 | ||
execSync('yarn', { | ||
stdio: 'inherit' | ||
}) | ||
} | ||
@@ -27,2 +46,4 @@ | ||
pkg.name = name | ||
pkg.version = '1.0.0' | ||
fse.writeFileSync('./package.json', JSON.stringify(pkg, null, 2)) | ||
@@ -29,0 +50,0 @@ // 更新版本 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58844
1189
16