feat: deployFlow

This commit is contained in:
xiaojunnuo
2020-12-16 00:35:05 +08:00
parent a4bd29e6bf
commit 06603759fd
23 changed files with 6397 additions and 9 deletions
@@ -0,0 +1,17 @@
import fs from 'fs'
export class AbstractPlugin {
async executeFromContextFile (options = {}) {
const { contextPath } = options
const contextJson = fs.readFileSync(contextPath)
const context = JSON.parse(contextJson)
const newContext = await this.execute(options, context)
fs.writeFileSync(JSON.stringify(newContext || context))
}
async execute (options, context) {
console.log('请实现此方法,context:', context)
return context
}
}