file-lane 2.0.2-beta.4 → 2.0.2-beta.6

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
@@ -152,7 +152,7 @@ class FileLane {
152
152
  });
153
153
  }
154
154
  catch (error) {
155
- console.log('error', error);
155
+ console.log('FileLane error', error);
156
156
  ColorConsole_1.default.throw(`ERROR: build error, ${error || 'unknown error'}`);
157
157
  // 结束任务
158
158
  process.exit();
@@ -5,6 +5,18 @@ import IPlugin from './IPlugin';
5
5
  export type ILoaderClass = (new (...args: any[]) => ILoader) & {
6
6
  raw?: boolean;
7
7
  };
8
+ export interface IRule {
9
+ /**
10
+ * 配置文件
11
+ */
12
+ test: MatchType;
13
+ /**
14
+ * 文件的 Loader,从前向后依次执行,前一个 loader 结果做为后一个 loader 的入参
15
+ */
16
+ loader: ILoaderClass[];
17
+ exclude?: MatchType;
18
+ include?: MatchType;
19
+ }
8
20
  /**
9
21
  * IFileLaneConfig
10
22
  */
@@ -45,15 +57,7 @@ export default interface IFileLaneConfig<O = any> {
45
57
  /**
46
58
  * 转换规则
47
59
  */
48
- rules: {
49
- /**
50
- * 配置文件
51
- */
52
- test: MatchType;
53
- loader: ILoaderClass[];
54
- exclude?: MatchType;
55
- include?: MatchType;
56
- }[];
60
+ rules: IRule[];
57
61
  };
58
62
  /**
59
63
  * 插件
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "file-lane",
3
- "version": "2.0.2-beta.4",
3
+ "version": "2.0.2-beta.6",
4
4
  "description": "File conversion tool, can be one-to-one, one to N, N to one",
5
5
  "keywords": [
6
6
  "file",
@@ -20,13 +20,15 @@
20
20
  "test": "node ./__tests__/file-lane.test.js"
21
21
  },
22
22
  "dependencies": {
23
- "@aiot-toolkit/shared-utils": "2.0.2-beta.4",
23
+ "@aiot-toolkit/shared-utils": "2.0.2-beta.6",
24
24
  "archiver": "^6.0.1",
25
25
  "chokidar": "^3.5.3",
26
26
  "lodash": "^4.17.21"
27
27
  },
28
28
  "devDependencies": {
29
- "@types/archiver": "^5.3.2"
29
+ "@types/archiver": "^5.3.2",
30
+ "@types/fs-extra": "^11.0.4",
31
+ "fs-extra": "^11.2.0"
30
32
  },
31
- "gitHead": "656add8e64d8101b9f3886957c5b9ae23e2e854f"
33
+ "gitHead": "b9b99afff176075380c2ec95b43797d696c393c1"
32
34
  }