pug-site-core 1.0.5 → 1.0.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.
- package/lib/generate.js +1 -3
- package/package.json +1 -1
package/lib/generate.js
CHANGED
|
@@ -32,10 +32,8 @@ export async function compilePagesPugToFn(pugPath) {
|
|
|
32
32
|
// 获取所有需要编译的pug文件路径
|
|
33
33
|
const pagesPugFilePathArr = await getPagesPugFilePathArr();
|
|
34
34
|
const fnRootPath = path.join(projectRoot, "/pagesPugFn");
|
|
35
|
-
|
|
36
35
|
// 读取pug运行时代码作为基础代码
|
|
37
|
-
const
|
|
38
|
-
const lastPugFnStr = await fse.readFile(pugRuntimePath, "utf8");
|
|
36
|
+
const lastPugFnStr = await fse.readFile("./pugRuntime.js", "utf8");
|
|
39
37
|
|
|
40
38
|
// 验证指定路径是否存在
|
|
41
39
|
if (pugPath && !fse.pathExistsSync(path.join(pugRootPath, pugPath))) {
|