diff --git a/packages/web-new/external-scripts/generate-paths.js b/packages/web-new/external-scripts/generate-paths.js index df9d39c2f..e4641ccee 100644 --- a/packages/web-new/external-scripts/generate-paths.js +++ b/packages/web-new/external-scripts/generate-paths.js @@ -63,16 +63,15 @@ async function getExamples(){ async function writeExamplesToFile(){ const examplesData = await getExamples() - console.log(examplesData); try { const jsonData = JSON.stringify(examplesData, null, 2) const filePath = "./src/examples-paths/examples-paths.json" await fs.writeFile(filePath, jsonData, 'utf-8') - console.log("File created succesfully"); + console.log("File created succesfully") } catch (err) { - console.error("Failed to wirte JSON file: ", err); + console.error("Failed to wirte JSON file: ", err) } } diff --git a/packages/web-new/package.json b/packages/web-new/package.json index 79b65ce26..4932cf72e 100644 --- a/packages/web-new/package.json +++ b/packages/web-new/package.json @@ -4,7 +4,7 @@ "description": "New design for the browser GUI for the Web of Things - Thing Description Playground", "main": "index.js", "scripts": { - "build": "webpack", + "build": "node external-scripts/generate-paths.js && webpack", "dev": "webpack && node server/server.js", "server": "node server/server.js", "examples": "node external-scripts/generate-paths.js"