@cloudbase/lowcode-builder 0.1.3 → 0.1.5-mpbeta.0

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.
Files changed (39) hide show
  1. package/lib/builder/config/index.d.ts +14 -0
  2. package/lib/builder/config/index.js +21 -2
  3. package/lib/builder/core/index.d.ts +4 -1
  4. package/lib/builder/core/index.js +15 -3
  5. package/lib/builder/h5/copy.js +5 -1
  6. package/lib/builder/h5/material.js +5 -1
  7. package/lib/builder/mp/BuildContext.d.ts +1 -0
  8. package/lib/builder/mp/index.d.ts +2 -1
  9. package/lib/builder/mp/index.js +70 -54
  10. package/lib/builder/mp/materials.d.ts +7 -0
  11. package/lib/builder/mp/materials.js +30 -14
  12. package/lib/builder/mp/mixMode.js +5 -1
  13. package/lib/builder/mp/mp_config.js +8 -4
  14. package/lib/builder/mp/plugin.js +5 -1
  15. package/lib/builder/service/webpack.js +10 -10
  16. package/lib/builder/util/common.js +5 -4
  17. package/lib/builder/util/generateFiles.d.ts +35 -0
  18. package/lib/builder/util/generateFiles.js +128 -2
  19. package/lib/builder/util/index.js +5 -1
  20. package/lib/builder/util/junk.js +4 -1
  21. package/lib/builder/util/mp.js +5 -1
  22. package/lib/builder/util/net.d.ts +20 -1
  23. package/lib/builder/util/net.js +77 -4
  24. package/lib/index.js +5 -1
  25. package/lib/types.d.ts +1 -0
  26. package/lib/types.js +3 -1
  27. package/package.json +21 -7
  28. package/template/mp/component/index.js +6 -2
  29. package/template/mp/page/index.js +6 -2
  30. package/lib/generate.d.ts +0 -1
  31. package/lib/generate.js +0 -60
  32. package/lib/tests/build.d.ts +0 -1
  33. package/lib/tests/build.js +0 -19
  34. package/lib/tests/build.test.d.ts +0 -1
  35. package/lib/tests/build.test.js +0 -22
  36. package/lib/tests/data.d.ts +0 -18
  37. package/lib/tests/data.js +0 -94216
  38. package/lib/utils/postProcess copy.d.ts +0 -2
  39. package/lib/utils/postProcess copy.js +0 -27
@@ -1,2 +0,0 @@
1
- export declare function postprocessProjectConfig(projectJsonPath: any, data: any): void;
2
- export declare function postprocessDeployExtraJson(projectPath: any, deployOptions: any): void;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.postprocessDeployExtraJson = exports.postprocessProjectConfig = void 0;
7
- const fs_extra_1 = __importDefault(require("fs-extra"));
8
- const lodash_1 = require("lodash");
9
- const path_1 = __importDefault(require("path"));
10
- function postprocessProjectConfig(projectJsonPath, data) {
11
- let projectJson = fs_extra_1.default.readJsonSync(projectJsonPath);
12
- fs_extra_1.default.writeJsonSync(projectJsonPath, (0, lodash_1.merge)(projectJson, data), { spaces: 2 });
13
- }
14
- exports.postprocessProjectConfig = postprocessProjectConfig;
15
- function postprocessDeployExtraJson(projectPath, deployOptions) {
16
- let { targetMpAppId, mpAppId } = deployOptions;
17
- if (targetMpAppId !== mpAppId) {
18
- let projectJson = fs_extra_1.default.readJsonSync(path_1.default.resolve(projectPath, 'project.config.json'));
19
- const miniprogramRoot = (projectJson === null || projectJson === void 0 ? void 0 : projectJson.miniprogramRoot) || './';
20
- fs_extra_1.default.writeFileSync(path_1.default.resolve(projectPath, miniprogramRoot, 'ext.json'), JSON.stringify({
21
- extEnable: true,
22
- extAppid: targetMpAppId,
23
- directCommit: true,
24
- }, null, 2));
25
- }
26
- }
27
- exports.postprocessDeployExtraJson = postprocessDeployExtraJson;