nextjs-server-modules
Advanced tools
Comparing version 1.5.8 to 1.5.9
@@ -29,3 +29,5 @@ const glob = require("glob-promise") | ||
// Run the generateRoutes command | ||
console.log("generating routes...") | ||
await require(`${dir}/.nsm/scripts/generate-routes.js`).generateRoutes() | ||
console.log("copying nextjs config...") | ||
await require(`${dir}/.nsm/scripts/copy-nextjs-config.js`).copyNextjsConfig() | ||
@@ -32,0 +34,0 @@ } |
@@ -30,4 +30,4 @@ const path = require("path") | ||
if (!module.parent) { | ||
if (require.main === module) { | ||
copyNextjsConfig() | ||
} |
@@ -27,3 +27,3 @@ const glob = require("glob-promise") | ||
for (const fp of staticFiles) { | ||
const fileContentB64 = (await fs.readFile(`${nextDir}/${fp}`)).toString( | ||
const fileContentB64 = (await fs.readFile(path.resolve(nextDir, fp))).toString( | ||
"base64" | ||
@@ -38,2 +38,4 @@ ) | ||
await mkdirp(path.dirname(outFilePath)) | ||
// Fixes race condition on MAC | ||
await new Promise(resolve => setTimeout(resolve, 1)) | ||
await fs.writeFile(outFilePath, outFileContent) | ||
@@ -76,4 +78,4 @@ } | ||
if (!module.parent) { | ||
if (require.main === module) { | ||
generateRoutes() | ||
} |
{ | ||
"name": "nextjs-server-modules", | ||
"version": "1.5.8", | ||
"version": "1.5.9", | ||
"main": "bin.js", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:hello-seam/nextjs-server-modules.git", |
56943
1666