@_tc/template-core 0.0.1-bate.14 → 0.0.1-bate.15

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.
@@ -2,14 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dev = dev;
4
4
  const utils_1 = require("./utils");
5
- async function dev() {
6
- // 获取入口
5
+ const init = async () => {
7
6
  const input = (0, utils_1.entries)();
7
+ console.log(input);
8
8
  if (!Object.keys(input).length) {
9
9
  console.error("no entry found");
10
10
  process.exit(1);
11
11
  }
12
12
  await (0, utils_1.VBuildFE)(input);
13
+ };
14
+ async function dev() {
15
+ // 获取入口
16
+ await init();
13
17
  // 监听文件变化
14
- (0, utils_1.watchFiles)(async () => (0, utils_1.VBuildFE)(input));
18
+ (0, utils_1.watchFiles)(async () => init());
15
19
  }
@@ -108,8 +108,8 @@ function entries() {
108
108
  return input;
109
109
  }
110
110
  function outDir() {
111
- // 为了保持代码 能见性 输出地址应该为 runPath/app/publish/dist
112
- return path_1.default.join(runPath, "./app/publish/dist");
111
+ // 为了保持代码 能见性 输出地址应该为 runPath/app/public/dist
112
+ return path_1.default.join(runPath, "./app/public/dist");
113
113
  }
114
114
  const watchFiles = async (callback) => {
115
115
  const chokidar = await Promise.resolve().then(() => __importStar(require("chokidar")));
@@ -1,12 +1,16 @@
1
1
  import { entries, VBuildFE, watchFiles } from "./utils";
2
- export async function dev() {
3
- // 获取入口
2
+ const init = async () => {
4
3
  const input = entries();
4
+ console.log(input);
5
5
  if (!Object.keys(input).length) {
6
6
  console.error("no entry found");
7
7
  process.exit(1);
8
8
  }
9
9
  await VBuildFE(input);
10
+ };
11
+ export async function dev() {
12
+ // 获取入口
13
+ await init();
10
14
  // 监听文件变化
11
- watchFiles(async () => VBuildFE(input));
15
+ watchFiles(async () => init());
12
16
  }
@@ -67,8 +67,8 @@ export function entries() {
67
67
  return input;
68
68
  }
69
69
  export function outDir() {
70
- // 为了保持代码 能见性 输出地址应该为 runPath/app/publish/dist
71
- return path.join(runPath, "./app/publish/dist");
70
+ // 为了保持代码 能见性 输出地址应该为 runPath/app/public/dist
71
+ return path.join(runPath, "./app/public/dist");
72
72
  }
73
73
  export const watchFiles = async (callback) => {
74
74
  const chokidar = await import("chokidar");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_tc/template-core",
3
- "version": "0.0.1-bate.14",
3
+ "version": "0.0.1-bate.15",
4
4
  "description": "A TypeScript Koa framework template - Monorepo root",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",