file-lane 2.0.3-beta.6 → 2.0.3-beta.8

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.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import IFileLaneConfig from './interface/IFileLaneConfig';
2
+ import FileLaneTriggerType from './enum/FileLaneTriggerType';
2
3
  import IFileLaneEvents from './interface/IFileLaneEvents';
4
+ export interface IBuilderParam {
5
+ fileList: string[];
6
+ trigger: FileLaneTriggerType;
7
+ }
3
8
  /**
4
9
  * FileLane
5
10
  *
6
11
  * 文件车道,用于将文件进行对应转换,支持1对1、1对N、N对1
7
12
  *
8
- * 打包过程中,有以下事件
9
- * 1. 打包成功:onBuildSuccess
10
- * 2. 打包失败: onBuildError
11
- * 3. 产生日志: onLog
12
- *
13
13
  * @example
14
14
  * ```
15
15
  * new FileLane<IJavascriptCompileOption>(
@@ -37,11 +37,14 @@ declare class FileLane<O = any> {
37
37
  private compilation?;
38
38
  private changeFileList;
39
39
  private triggerCount;
40
+ private building;
41
+ private nextBuildParam;
40
42
  /**
41
43
  * 实例化FileLane
42
44
  * @param config fileLane 配置
43
45
  * @param projectPath 项目路径
44
46
  * @param compilerOption 编译参数,不同语言的项目具有的参数不同,即使同一项目开发者也会设置不同的参数
47
+ * @param events 事件监听器
45
48
  */
46
49
  constructor(config: IFileLaneConfig<O>, projectPath?: string, compilerOption?: O | undefined, events?: IFileLaneEvents | undefined);
47
50
  private addProcessListener;
@@ -62,6 +65,13 @@ declare class FileLane<O = any> {
62
65
  private processBeforeExitHandler;
63
66
  private sigintHandler;
64
67
  dispose(): Promise<void>;
68
+ /**
69
+ * 触发编译
70
+ *
71
+ * 如果:在编译过程中,则记录统参数,待本次 build 完成后,开始下一次
72
+ * 否则:直接触发编译
73
+ */
74
+ private triggerBuild;
65
75
  /**
66
76
  *
67
77
  * @param fileList 原始文件列表