From 7ca04cfb07fa308abd90f475b1bd35ce58d183df Mon Sep 17 00:00:00 2001 From: Roy Li Date: Thu, 27 Feb 2020 11:46:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Artifact=20=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E5=90=8E=E8=BF=94=E5=9B=9E=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/generator/artifact.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/generator/artifact.ts b/lib/generator/artifact.ts index 2866ab465..9f275dcdf 100644 --- a/lib/generator/artifact.ts +++ b/lib/generator/artifact.ts @@ -160,7 +160,7 @@ export class Artifact extends EventEmitter { }; } - public async init(templateEngine?: Environment): Promise { + public async init(templateEngine?: Environment): Promise { if (this.isReady) { throw new Error('Artifact 已经初始化完成'); } @@ -193,6 +193,8 @@ export class Artifact extends EventEmitter { }); this.emit('initArtifact:end', { artifact: this.artifact }); + + return this; } public render(templateEngine?: Environment): string {