From 62f4103b8156cd2f9eb117bfd7d1ffb9eb4701e6 Mon Sep 17 00:00:00 2001 From: Sid Vishnoi Date: Mon, 8 Mar 2021 17:05:09 +0530 Subject: [PATCH] fix(build/bikeshed): use --die-on as a global option (#37) --- src/build.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/build.js b/src/build.js index 9939bc3..aff3ef8 100644 --- a/src/build.js +++ b/src/build.js @@ -103,11 +103,14 @@ async function buildReSpec(source, outputFile, additionalFlags, conf) { * @param {BuildInput["configOverride"]["gh" | "w3c"]} conf */ async function buildBikeshed(source, outputFile, additionalFlags, conf) { - const metadataFlags = Object.entries(conf || {}).map( - ([key, val]) => `--md-${key.replace(/\s+/g, "-")}="${val}"`, + const metadataFlags = Object.entries(conf || {}) + .map(([key, val]) => `--md-${key.replace(/\s+/g, "-")}="${val}"`) + .join(" "); + const flags = additionalFlags.join(" "); + await sh( + `bikeshed ${flags} spec "${source}" "${outputFile}" ${metadataFlags}`, + "stream", ); - const flags = additionalFlags.concat(metadataFlags).join(" "); - await sh(`bikeshed spec "${source}" "${outputFile}" ${flags}`, "stream"); } /**