Skip to content

Commit

Permalink
Add new Wattsi args support
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed May 22, 2018
1 parent 69f7059 commit 7e7f264
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ app.use(route.get("/ping", function* () {
app.use(route.post("/wattsi", function* () {
const parts = yield* multipart(this);

const sha = parts.field.sha || "(sha not provided)";
const buildType = parts.field.build || "default";
const sourceFilePath = getFilePath(parts, "source", this);
const caniuseFilePath = getFilePath(parts, "caniuse", this);
const w3cbugsFilePath = getFilePath(parts, "w3cbugs", this);

const outDirectory = randomDirectoryName();
yield mkdirp(outDirectory);

const args = [sourceFilePath, outDirectory, caniuseFilePath, w3cbugsFilePath];
const args = [sourceFilePath, sha, outDirectory, buildType, caniuseFilePath, w3cbugsFilePath];
if ("quiet" in this.query) {
args.unshift("--quiet");
}
Expand Down

0 comments on commit 7e7f264

Please sign in to comment.