refactor: export

This commit is contained in:
xiaojunnuo
2021-02-09 18:05:01 +08:00
parent a9b6e87249
commit c3e374e6e5
8 changed files with 52 additions and 23 deletions
@@ -27,11 +27,12 @@ export default {
fs.writeJsonSync(optionsFilePath, options)
// 依赖版本
const exePkgJson = fs.readFileSync('node_modules/@certd/executor/package.json')
const exePkgJson = fs.readFileSync(pathUtil.join('node_modules/@certd/executor/package.json'))
const executorPkg = JSON.parse(exePkgJson)
const currentVersion = executorPkg.version
const templatePkg = require('../templates/certd-run/package.json')
const templatePkgJson = fs.readFileSync(pathUtil.join('templates/certd-run/package.json'))
const templatePkg = JSON.parse(templatePkgJson)
templatePkg.dependencies['@certd/executor'] = '^' + currentVersion
templatePkg.dependencies['@certd/plugin-aliyun'] = '^' + currentVersion
templatePkg.dependencies['@certd/plugin-host'] = '^' + currentVersion