Skip to content

Commit

Permalink
fix(build/bikeshed): use --die-on as a global option (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi authored Mar 8, 2021
1 parent 0b3957d commit 62f4103
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

/**
Expand Down

0 comments on commit 62f4103

Please sign in to comment.