Merge branch 'dev' of http://git.sinoecare.com/sinoecare/digital_village_v2/dvcp_v2_webapp into dev
This commit is contained in:
@@ -50,8 +50,6 @@ const start = () => {
|
|||||||
}])
|
}])
|
||||||
}).then(res => new Promise(resolve => {
|
}).then(res => new Promise(resolve => {
|
||||||
const {PROJECT} = res
|
const {PROJECT} = res
|
||||||
let install = path.join(__dirname, PROJECT, 'index.js')
|
|
||||||
fsExtra.ensureFile(install)
|
|
||||||
const coreLib = path.join(__dirname, PROJECT, 'core.import.json')
|
const coreLib = path.join(__dirname, PROJECT, 'core.import.json')
|
||||||
fsExtra.readJson(coreLib, (err, data) => {
|
fsExtra.readJson(coreLib, (err, data) => {
|
||||||
chalkTag.info("加载核心库配置..")
|
chalkTag.info("加载核心库配置..")
|
||||||
@@ -94,6 +92,7 @@ const start = () => {
|
|||||||
name: "CONFIRM",
|
name: "CONFIRM",
|
||||||
type: 'confirm',
|
type: 'confirm',
|
||||||
message: "未读取到业务应用配置文件,是否要打包整个packages?",
|
message: "未读取到业务应用配置文件,是否要打包整个packages?",
|
||||||
|
default: false
|
||||||
}]).then(res => {
|
}]).then(res => {
|
||||||
if (res.CONFIRM) {
|
if (res.CONFIRM) {
|
||||||
findApp(appDir, file => {
|
findApp(appDir, file => {
|
||||||
@@ -115,14 +114,15 @@ const start = () => {
|
|||||||
})
|
})
|
||||||
})).then(prj => new Promise(resolve => {
|
})).then(prj => new Promise(resolve => {
|
||||||
if (prj == 'dvui') {
|
if (prj == 'dvui') {
|
||||||
return resolve(prj)
|
resolve(prj)
|
||||||
}
|
} else {
|
||||||
chalkTag.info('正在生成打包文件...')
|
chalkTag.info('正在生成打包文件...')
|
||||||
let bin = path.join(__dirname, prj.toString(), 'index.js'),
|
let install = path.join(__dirname, PROJECT, 'index.js')
|
||||||
coreApps = cores.map(e => `{name:'${e.name}',component:require('../../${e.component}').default}`),
|
fsExtra.ensureFile(install)
|
||||||
bizApps = apps.map(e => `{name:'${e.name}',component:require('../../${e.component}').default}`),
|
let coreApps = cores.map(e => `{name:'${e.name}',component:require('../../${e.component}').default}`),
|
||||||
comps = [...coreApps, ...bizApps],
|
bizApps = apps.map(e => `{name:'${e.name}',component:require('../../${e.component}').default}`),
|
||||||
content = `
|
comps = [...coreApps, ...bizApps],
|
||||||
|
content = `
|
||||||
const apps = [${comps.toString()}]
|
const apps = [${comps.toString()}]
|
||||||
const install = function (Vue) {
|
const install = function (Vue) {
|
||||||
if (install.installed) return Promise.resolve()
|
if (install.installed) return Promise.resolve()
|
||||||
@@ -154,13 +154,14 @@ const start = () => {
|
|||||||
install
|
install
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
fsExtra.outputFile(bin, content, err => {
|
fsExtra.outputFile(install, content, err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
chalkTag.error(err)
|
chalkTag.error(err)
|
||||||
reject()
|
reject()
|
||||||
} else chalkTag.done('生成打包文件')
|
} else chalkTag.done('生成打包文件')
|
||||||
resolve(prj)
|
resolve(prj)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})).then(project => new Promise((resolve, reject) => {
|
})).then(project => new Promise((resolve, reject) => {
|
||||||
fsExtra.readJson(path.join(__dirname, project.toString(), 'package.json'), (err, json) => {
|
fsExtra.readJson(path.join(__dirname, project.toString(), 'package.json'), (err, json) => {
|
||||||
let cmd = `vue-cli-service build --target lib --dest project/${project}/dist project/${project}/${project == 'dvui' ? 'entries' : 'index'}.js --name ${json.name}`
|
let cmd = `vue-cli-service build --target lib --dest project/${project}/dist project/${project}/${project == 'dvui' ? 'entries' : 'index'}.js --name ${json.name}`
|
||||||
@@ -171,18 +172,18 @@ const start = () => {
|
|||||||
log(stdout);
|
log(stdout);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
chalkTag.done('打包成功!')
|
chalkTag.done('打包成功!')
|
||||||
resolve(project)
|
resolve({project, name: json.name})
|
||||||
} else {
|
} else {
|
||||||
chalkTag.error(err)
|
chalkTag.error(err)
|
||||||
reject()
|
reject()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})).then(project => {
|
})).then((prj) => {
|
||||||
chalkTag.info('正在发布中...')
|
chalkTag.info('正在发布中...')
|
||||||
let cmd = `cd ${project}&npm unpublish --force&npm publish`
|
let cmd = `npm unpublish ${prj.name} --force&npm publish --workspace project/${prj.project}`
|
||||||
exec(cmd, {
|
exec(cmd, {
|
||||||
cwd: path.join(__dirname, '.')
|
cwd: path.join(__dirname, '..')
|
||||||
}, (err, stdout) => {
|
}, (err, stdout) => {
|
||||||
log(stdout);
|
log(stdout);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
|||||||
@@ -665,10 +665,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep.ai-list__content--right {
|
|
||||||
overflow: visible !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .treePanel {
|
::v-deep .treePanel {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
Reference in New Issue
Block a user