@_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.
- package/cjs/bundler/dev.js +7 -3
- package/cjs/bundler/utils.js +2 -2
- package/esm/bundler/dev.js +7 -3
- package/esm/bundler/utils.js +2 -2
- package/package.json +1 -1
package/cjs/bundler/dev.js
CHANGED
|
@@ -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
|
|
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 () => (
|
|
18
|
+
(0, utils_1.watchFiles)(async () => init());
|
|
15
19
|
}
|
package/cjs/bundler/utils.js
CHANGED
|
@@ -108,8 +108,8 @@ function entries() {
|
|
|
108
108
|
return input;
|
|
109
109
|
}
|
|
110
110
|
function outDir() {
|
|
111
|
-
// 为了保持代码 能见性 输出地址应该为 runPath/app/
|
|
112
|
-
return path_1.default.join(runPath, "./app/
|
|
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")));
|
package/esm/bundler/dev.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { entries, VBuildFE, watchFiles } from "./utils";
|
|
2
|
-
|
|
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 () =>
|
|
15
|
+
watchFiles(async () => init());
|
|
12
16
|
}
|
package/esm/bundler/utils.js
CHANGED
|
@@ -67,8 +67,8 @@ export function entries() {
|
|
|
67
67
|
return input;
|
|
68
68
|
}
|
|
69
69
|
export function outDir() {
|
|
70
|
-
// 为了保持代码 能见性 输出地址应该为 runPath/app/
|
|
71
|
-
return path.join(runPath, "./app/
|
|
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");
|