@wzyjs/cli 0.1.8 → 0.2.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.
@@ -21,8 +21,8 @@ exports.default = (cli) => {
21
21
  console.info('正在清理之前的 build 产物...');
22
22
  await fs.promises.rm(outDir, { recursive: true });
23
23
  }
24
- await (0, utils_1.replaceContentInFile)(process.cwd() + '/tsconfig.json', '"extends": "./src/.umi/tsconfig.json",', '');
25
- await (0, utils_1.replaceContentInFile)(process.cwd() + '/tsconfig.json', '"./src/.umi/typings"', '');
24
+ // await replaceContentInFile(process.cwd() + '/tsconfig.json', '"extends": "./src/.umi/tsconfig.json",', '')
25
+ // await replaceContentInFile(process.cwd() + '/tsconfig.json', '"./src/.umi/typings"', '')
26
26
  // 合并用户配置
27
27
  const productionConfig = (0, utils_1.getProductionConfig)(root);
28
28
  console.info('正在打包前端代码...');
@@ -37,7 +37,7 @@ exports.default = (cli) => {
37
37
  (0, utils_1.createRender)((0, path_1.join)(root, outDir));
38
38
  // 写 midway.config.js 到 dist 目录
39
39
  (0, utils_1.writeConfig)(outDir, productionConfig);
40
- console.info('正在打包后端代码...', root);
40
+ console.info('正在打包后端代码...', root, outDir);
41
41
  try {
42
42
  const rdBuild = await (0, utils_1.executePromise)((0, utils_1.buildServer)(root, outDir));
43
43
  console.info(`打包后端代码成功~ 耗时:` + rdBuild.time / 1000 + 's');
@@ -8,7 +8,7 @@ const command_core_1 = require("@midwayjs/command-core");
8
8
  const cli_plugin_build_1 = require("@midwayjs/cli-plugin-build");
9
9
  const hooks_internal_1 = require("@midwayjs/hooks-internal");
10
10
  const createRender = (dist) => {
11
- const code = `exports.default = require('@midwayjs/serve').Serve('/*', { dir: '_client', isKit: true })`;
11
+ const code = `exports.default = require('@midwayjs/serve').Serve('/*', { dir: '_client', isKit: true });`;
12
12
  const file = (0, path_1.join)(dist, '_serve/index.js');
13
13
  fs.ensureFileSync(file);
14
14
  fs.writeFileSync(file, code, 'utf-8');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wzyjs/cli",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
4
4
  "description": "description",
5
5
  "author": "wzy",
6
6
  "license": "ISC",
@@ -44,5 +44,5 @@
44
44
  "type": "git",
45
45
  "url": "https://gitee.com/wang-zhenyu/app.git"
46
46
  },
47
- "gitHead": "1b21293a5dceaf179fb8c038beca93e048bdec8c"
47
+ "gitHead": "9db7e1b57099008c0b7be8d611bbc91f502f2daf"
48
48
  }