Comparing version 2.0.2-beta.1 to 2.0.2-beta.2
@@ -157,2 +157,4 @@ "use strict"; | ||
ColorConsole_1.default.throw(`ERROR: build error, ${error || 'unknown error'}`); | ||
// 结束任务 | ||
process.exit(); | ||
} | ||
@@ -280,3 +282,11 @@ }); | ||
for (let item of followWorks) { | ||
yield item(this.context, this.config, this.compilerOption); | ||
try { | ||
ColorConsole_1.default.info(`FollowWork: ${item.workerDescribe} start`); | ||
yield item.worker(this.context, this.config, this.compilerOption); | ||
ColorConsole_1.default.info(`FollowWork: ${item.workerDescribe} end`); | ||
} | ||
catch (error) { | ||
ColorConsole_1.default.throw(`FollowWork: ${item.workerDescribe} error, ${error}`); | ||
process.exit(); | ||
} | ||
} | ||
@@ -283,0 +293,0 @@ } |
@@ -81,3 +81,3 @@ import { MatchType } from '@aiot-toolkit/shared-utils/lib/utils/FileUtil'; | ||
*/ | ||
followWorks?: FollowWork<O>[]; | ||
followWorks?: FollowWoker<O>[]; | ||
/** | ||
@@ -88,3 +88,8 @@ * 配置watch时忽略的文件或者文件夹 | ||
} | ||
type FollowWoker<O> = { | ||
worker: FollowWork<O>; | ||
workerDescribe?: string; | ||
}; | ||
export type FollowWork<O = any> = (context: IFileLaneContext, config?: IFileLaneConfig, compilerOption?: O) => Promise<any>; | ||
export type PreWork<O = any> = (context: IFileLaneContext, fileList: string[], config: IFileLaneConfig, compilerOption?: O) => Promise<any>; | ||
export {}; |
{ | ||
"name": "file-lane", | ||
"version": "2.0.2-beta.1", | ||
"version": "2.0.2-beta.2", | ||
"description": "File conversion tool, can be one-to-one, one to N, N to one", | ||
@@ -23,3 +23,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@aiot-toolkit/shared-utils": "2.0.2-beta.1", | ||
"@aiot-toolkit/shared-utils": "2.0.2-beta.2", | ||
"archiver": "^6.0.1", | ||
@@ -32,3 +32,3 @@ "chokidar": "^3.5.3", | ||
}, | ||
"gitHead": "9244af36e617295ea4ff11a2f4f07f0e4f9f5f59" | ||
"gitHead": "5226bdb0ba61daef207531c2eaaf3d034e04c50f" | ||
} |
34891
948
+ Added@aiot-toolkit/shared-utils@2.0.2-beta.2(transitive)
- Removed@aiot-toolkit/shared-utils@2.0.2-beta.1(transitive)