xhs-mp-compiler-cli 1.1.6-beta.0 → 1.1.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.
@@ -1,5 +1,6 @@
1
- /// <reference types="node/child_process" />
2
- /// <reference types="node/stream" />
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
3
4
  /**
4
5
  * 在子进程执行编译
5
6
  */
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference types="node/events" />
1
+ /// <reference types="node" />
2
2
  import { COMPILE_ENTRY } from './config/constant.config';
3
3
  import { Project } from 'xhs-mp-project';
4
4
  import EventEmitter from 'events';
@@ -1,3 +1,3 @@
1
1
  import { IStart } from '../../types';
2
2
  import { MPPack } from 'xhs-mp-pack';
3
- export declare const createCompiler: (startConfig: IStart) => Promise<void> | MPPack;
3
+ export declare const createCompiler: (startConfig: IStart) => MPPack;
@@ -7,7 +7,6 @@ exports.createCompiler = void 0;
7
7
  const presets_1 = require("../../presets");
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const xhs_mp_pack_1 = require("xhs-mp-pack");
10
- const dev_server_1 = __importDefault(require("../webpack/dev-server"));
11
10
  const createCompiler = (startConfig) => {
12
11
  const { action, enableDevServer } = startConfig;
13
12
  const mppack = new xhs_mp_pack_1.MPPack(startConfig);
@@ -19,13 +18,10 @@ const createCompiler = (startConfig) => {
19
18
  mpPackConfigs.forEach(config => {
20
19
  var _a, _b, _c, _d;
21
20
  /* 修改在ide里的node_modules的路径 */
22
- (_b = (_a = config.resolve) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.push(path_1.default.resolve(__dirname, '../../../'));
21
+ (_b = (_a = config.resolve) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.push(path_1.default.resolve(__dirname, '../../../../'));
23
22
  // cli的node_modules路径
24
23
  (_d = (_c = config.resolve) === null || _c === void 0 ? void 0 : _c.modules) === null || _d === void 0 ? void 0 : _d.push(path_1.default.resolve(__dirname, '../../'));
25
24
  });
26
- if (action === 'dev' && enableDevServer) {
27
- return (0, dev_server_1.default)(compilerOptions);
28
- }
29
25
  mppack.createCompiler(mpPackConfigs);
30
26
  return mppack;
31
27
  };
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.presetRender = exports.getRenderEntry = void 0;
7
- const path_1 = __importDefault(require("path"));
8
7
  const css_1 = __importDefault(require("../../../../utils/css"));
9
8
  const getSuffixName_1 = require("../../../../utils/getSuffixName");
10
9
  const sjsEntryPlugin_1 = __importDefault(require("./sjsEntryPlugin"));
@@ -29,10 +28,10 @@ const presetRender = (chain, options) => {
29
28
  libraryTarget: 'umd',
30
29
  uniqueName: 'MpRender',
31
30
  },
32
- cache: {
33
- type: 'filesystem',
34
- cacheDirectory: path_1.default.join(cacheDirectory, 'render'),
35
- },
31
+ // cache: {
32
+ // type: 'filesystem',
33
+ // cacheDirectory: path.join(cacheDirectory!, 'render'),
34
+ // },
36
35
  module: {
37
36
  rule: {
38
37
  ml: {
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.presetService = exports.getServiceEntry = void 0;
7
- const path_1 = __importDefault(require("path"));
8
7
  const xhs_mp_pack_1 = require("xhs-mp-pack");
9
8
  const serviceChunkPlugin_1 = __importDefault(require("./serviceChunkPlugin"));
10
9
  const InjectorPlugin_1 = require("../../../plugins/InjectorPlugin");
@@ -50,10 +49,10 @@ const presetService = (chain, options) => {
50
49
  libraryTarget: 'umd',
51
50
  uniqueName: 'MpService',
52
51
  },
53
- cache: {
54
- type: 'filesystem',
55
- cacheDirectory: path_1.default.join(cacheDirectory, 'service'),
56
- },
52
+ // cache: {
53
+ // type: 'filesystem',
54
+ // cacheDirectory: path.join(cacheDirectory!, 'service'),
55
+ // },
57
56
  });
58
57
  chain.plugin('InjectorPlugin').use(InjectorPlugin_1.InjectorPlugin, [options]);
59
58
  chain.plugin('ServiceChunkPlugin').use(serviceChunkPlugin_1.default, [options]);
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  export interface IZipFactory {
2
3
  outputDir: string;
3
4
  ignore: string[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { Archiver } from 'archiver';
2
3
  import * as fse from 'fs-extra';
3
4
  interface IOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xhs-mp-compiler-cli",
3
- "version": "1.1.6-beta.0",
3
+ "version": "1.1.6",
4
4
  "description": "xhs mp command tool.",
5
5
  "preferGlobal": true,
6
6
  "category": "esm",
@@ -82,11 +82,11 @@
82
82
  "webpack-bundle-analyzer": "^4.4.0",
83
83
  "webpack-chain": "^6.5.1",
84
84
  "webpack-sources": "^3.2.2",
85
- "xhs-mp-compiler-ml-loader": "1.1.4",
86
- "xhs-mp-compiler-utils": "1.1.2",
87
- "xhs-mp-pack": "^1.1.4-beta.0",
88
- "xhs-mp-project": "^1.2.0-beta.0",
89
- "xhs-mp-utils": "^1.1.2"
85
+ "xhs-mp-compiler-ml-loader": "1.1.5",
86
+ "xhs-mp-compiler-utils": "1.1.3",
87
+ "xhs-mp-pack": "^1.1.4",
88
+ "xhs-mp-project": "^1.1.4",
89
+ "xhs-mp-utils": "^1.1.3"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@types/babel__generator": "7.6.3",