From 28185c2878ffe50a91ed6f0af4345490a8c601ba Mon Sep 17 00:00:00 2001 From: Sergio Eduardo Castro Ceballos <72516762+SergioCasCeb@users.noreply.github.com> Date: Mon, 18 Sep 2023 20:54:22 +0200 Subject: [PATCH] fixes to the generate path js and package.json --- packages/web-new/external-scripts/generate-paths.js | 5 ++--- packages/web-new/package.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) 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"