From 61eff6d4fb2e5d7820fdf25cbe860a15a45a3155 Mon Sep 17 00:00:00 2001 From: Mathias Schopmans Date: Fri, 14 Mar 2025 17:00:30 +0100 Subject: [PATCH] fix: forward flags to `npm run build` and adjust README.md --- README.md | 4 +++- bin/techradar.js | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58a661e..8484727 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ file like the following and adapt to your needs: "version": "1.0.0", "license": "MIT", "scripts": { - "build": "techradar build", + "build": "techradar build --strict", "serve": "techradar serve" }, "dependencies": { @@ -58,6 +58,8 @@ Run `npm install` to install the dependencies and run `npm run build` to create This will also create a basic bootstrap of all required files, including the `config.json` and the `about.md` if they do not exist yet. +Note: The `--strict` flag will break the build process if there are any errors in the markdown files. If you do not care about errors, you can remove the `--strict` flag. + ### Step 2: Change logo and the favicon Place your `logo.svg` and `favicon.ico` in the `public` folder next to the `package.json`. diff --git a/bin/techradar.js b/bin/techradar.js index 1406b0d..c381f53 100644 --- a/bin/techradar.js +++ b/bin/techradar.js @@ -11,6 +11,7 @@ const SOURCE_DIR = path.join(CWD, "node_modules", "aoe_technology_radar"); const HASH_FILE = path.join(BUILDER_DIR, "hash"); const PARAMETER = process.argv[2]; // "build" or "serve" +const FLAGS = process.argv.slice(3).join(" "); function info(message) { console.log(`\x1b[32m${message}\x1b[0m`); @@ -146,7 +147,9 @@ try { } info("Building data"); -execSync("npm run build:data", { stdio: "inherit" }); +execSync(`npm run build:data -- ${FLAGS}`, { + stdio: "inherit", +}); if (PARAMETER === "serve") { info("Starting techradar");