file-lane 2.0.2-beta.1 → 2.0.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/FileLane.js
CHANGED
|
@@ -154,6 +154,8 @@ class FileLane {
|
|
|
154
154
|
catch (error) {
|
|
155
155
|
console.log('error', error);
|
|
156
156
|
ColorConsole_1.default.throw(`ERROR: build error, ${error || 'unknown error'}`);
|
|
157
|
+
// 结束任务
|
|
158
|
+
process.exit();
|
|
157
159
|
}
|
|
158
160
|
});
|
|
159
161
|
}
|
|
@@ -276,7 +278,15 @@ class FileLane {
|
|
|
276
278
|
const { followWorks } = this.config;
|
|
277
279
|
if (followWorks) {
|
|
278
280
|
for (let item of followWorks) {
|
|
279
|
-
|
|
281
|
+
try {
|
|
282
|
+
ColorConsole_1.default.info(`FollowWork: ${item.workerDescribe} start`);
|
|
283
|
+
yield item.worker(this.context, this.config, this.compilerOption);
|
|
284
|
+
ColorConsole_1.default.info(`FollowWork: ${item.workerDescribe} end`);
|
|
285
|
+
}
|
|
286
|
+
catch (error) {
|
|
287
|
+
ColorConsole_1.default.throw(`FollowWork: ${item.workerDescribe} error, ${error}`);
|
|
288
|
+
process.exit();
|
|
289
|
+
}
|
|
280
290
|
}
|
|
281
291
|
}
|
|
282
292
|
});
|
|
@@ -78,11 +78,16 @@ export default interface IFileLaneConfig<O = any> {
|
|
|
78
78
|
* ux--[webpack, zip]
|
|
79
79
|
* uxInspect--[webpack, zipPhone, zipWatch, zipTv]
|
|
80
80
|
*/
|
|
81
|
-
followWorks?:
|
|
81
|
+
followWorks?: FollowWoker<O>[];
|
|
82
82
|
/**
|
|
83
83
|
* 配置watch时忽略的文件或者文件夹
|
|
84
84
|
*/
|
|
85
85
|
watchIgnores?: MatchType;
|
|
86
86
|
}
|
|
87
|
+
type FollowWoker<O> = {
|
|
88
|
+
worker: FollowWork<O>;
|
|
89
|
+
workerDescribe?: string;
|
|
90
|
+
};
|
|
87
91
|
export type FollowWork<O = any> = (context: IFileLaneContext, config?: IFileLaneConfig, compilerOption?: O) => Promise<any>;
|
|
88
92
|
export type PreWork<O = any> = (context: IFileLaneContext, fileList: string[], config: IFileLaneConfig, compilerOption?: O) => Promise<any>;
|
|
93
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "file-lane",
|
|
3
|
-
"version": "2.0.2-beta.
|
|
3
|
+
"version": "2.0.2-beta.2",
|
|
4
4
|
"description": "File conversion tool, can be one-to-one, one to N, N to one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"file",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test": "node ./__tests__/file-lane.test.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@aiot-toolkit/shared-utils": "2.0.2-beta.
|
|
23
|
+
"@aiot-toolkit/shared-utils": "2.0.2-beta.2",
|
|
24
24
|
"archiver": "^6.0.1",
|
|
25
25
|
"chokidar": "^3.5.3",
|
|
26
26
|
"lodash": "^4.17.21"
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/archiver": "^5.3.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "5226bdb0ba61daef207531c2eaaf3d034e04c50f"
|
|
32
32
|
}
|