olum-compiler 2.0.0 → 2.0.1
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/helpers.js +4 -1
- package/package.json +1 -1
package/lib/helpers.js
CHANGED
|
@@ -20,6 +20,9 @@ const base64ToString = (base64) =>
|
|
|
20
20
|
Buffer.from(base64, "base64").toString("ascii");
|
|
21
21
|
const acorn = require("acorn");
|
|
22
22
|
|
|
23
|
+
// keep in sync with bin/ssg.js, which reads this same file
|
|
24
|
+
const routesPath = path.resolve(__dirname, "../routes.json");
|
|
25
|
+
|
|
23
26
|
const cleanParentheses = (filePath, type = "name") => {
|
|
24
27
|
if (type == "name") {
|
|
25
28
|
return filePath.replace(/\([^)]*\)/g, "");
|
|
@@ -757,7 +760,7 @@ ${routes
|
|
|
757
760
|
.join(",\n")}
|
|
758
761
|
];`;
|
|
759
762
|
|
|
760
|
-
fs.writeFileSync(
|
|
763
|
+
fs.writeFileSync(routesPath, `${JSON.stringify(paths, null, 2)}`);
|
|
761
764
|
return result;
|
|
762
765
|
}
|
|
763
766
|
|