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.
Files changed (2) hide show
  1. package/lib/helpers.js +4 -1
  2. 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("./routes.json", `${JSON.stringify(paths, null, 2)}`);
763
+ fs.writeFileSync(routesPath, `${JSON.stringify(paths, null, 2)}`);
761
764
  return result;
762
765
  }
763
766
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "olum-compiler",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "A module for compiling/bundling olumjs projects",
5
5
  "main": "bin/index.js",
6
6
  "bin": {