@aiot-toolkit/aiotpack 2.0.5-beta.17 → 2.0.5-beta.19

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.
@@ -62,5 +62,9 @@ declare class UxAfterCompile {
62
62
  * @param params
63
63
  */
64
64
  static resourceCheck: FollowWork<IJavascriptCompileOption>;
65
+ /**
66
+ * 写入.gitignore文件, 忽略临时目录
67
+ */
68
+ static writeGitIgnore: FollowWork<IJavascriptCompileOption>;
65
69
  }
66
70
  export default UxAfterCompile;
@@ -494,5 +494,20 @@ class UxAfterCompile {
494
494
  onLog?.(logs);
495
495
  }
496
496
  };
497
+
498
+ /**
499
+ * 写入.gitignore文件, 忽略临时目录
500
+ */
501
+ static writeGitIgnore = async params => {
502
+ const {
503
+ context
504
+ } = params;
505
+ const {
506
+ output,
507
+ projectPath
508
+ } = context;
509
+ const gitIgnorePath = _path.default.join(projectPath, output, '.gitignore');
510
+ _fsExtra.default.writeFileSync(gitIgnorePath, '*');
511
+ };
497
512
  }
498
513
  var _default = exports.default = UxAfterCompile;
@@ -26,10 +26,13 @@ declare class UxConfig implements IFileLaneConfig<IJavascriptCompileOption> {
26
26
  get output(): string;
27
27
  beforeWorks: (typeof UxBeforeWorks.cleanOutput)[];
28
28
  beforeCompile: import("file-lane").PreWork<IJavascriptCompileOption>[];
29
- afterCompile: {
29
+ afterCompile: ({
30
+ worker: import("file-lane").FollowWork<IJavascriptCompileOption>;
31
+ workerDescribe?: undefined;
32
+ } | {
30
33
  worker: import("file-lane").FollowWork<IJavascriptCompileOption>;
31
34
  workerDescribe: string;
32
- }[];
35
+ })[];
33
36
  afterWorks: (typeof UxAfterWorks.cleanOutput)[];
34
37
  watchIgnores: RegExp[];
35
38
  /**
@@ -75,6 +75,8 @@ class UxConfig {
75
75
  beforeWorks = (() => [_UxBeforeWorks.default.cleanOutput])();
76
76
  beforeCompile = (() => [_UxBeforeCompile.default.validateManifest, _UxBeforeCompile.default.validateSitemap, _BeforeCompileUtils.default.clean, _BeforeCompileUtils.default.getEntries, _BeforeCompileUtils.default.getGlobalVar])();
77
77
  afterCompile = (() => [{
78
+ worker: _UxAfterCompile.default.writeGitIgnore
79
+ }, {
78
80
  worker: _UxAfterCompile.default.symlinkNodeModule,
79
81
  workerDescribe: 'Create a soft link to the node_modules folder'
80
82
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiot-toolkit/aiotpack",
3
- "version": "2.0.5-beta.17",
3
+ "version": "2.0.5-beta.19",
4
4
  "description": "The process tool for packaging aiot projects.",
5
5
  "keywords": [
6
6
  "aiotpack"
@@ -19,14 +19,14 @@
19
19
  "test": "node ./__tests__/aiotpack.test.js"
20
20
  },
21
21
  "dependencies": {
22
- "@aiot-toolkit/generator": "2.0.5-beta.17",
23
- "@aiot-toolkit/parser": "2.0.5-beta.17",
24
- "@aiot-toolkit/shared-utils": "2.0.5-beta.17",
22
+ "@aiot-toolkit/generator": "2.0.5-beta.19",
23
+ "@aiot-toolkit/parser": "2.0.5-beta.19",
24
+ "@aiot-toolkit/shared-utils": "2.0.5-beta.19",
25
25
  "@hap-toolkit/aaptjs": "^2.0.0",
26
26
  "@rspack/core": "^1.3.9",
27
27
  "aiot-parse5": "^1.0.2",
28
28
  "babel-loader": "^9.1.3",
29
- "file-lane": "2.0.5-beta.17",
29
+ "file-lane": "2.0.5-beta.19",
30
30
  "file-loader": "^6.2.0",
31
31
  "fs-extra": "^11.2.0",
32
32
  "hap-toolkit": "^2.0.0",
@@ -43,5 +43,5 @@
43
43
  "@types/jsrsasign": "^10.5.12",
44
44
  "@types/webpack-sources": "^3.2.3"
45
45
  },
46
- "gitHead": "1cff047e2550e845444857b475d63a01b8705768"
46
+ "gitHead": "a0db41174e2ccc9750a8422bed0bc3392965407d"
47
47
  }