Skip to content

Commit

Permalink
fix regression where cli doesnt build index.js (vercel#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored Jun 4, 2019
1 parent ddaf55a commit 421c19d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async function runCmd (argv, stdout, stderr) {

// fallthrough
case "build":
const buildFiles = runArgs ? resolve(args._[1]) : args._.slice(1);
const buildFiles = (runArgs || args._.length === 2) ? resolve(args._[1]) : args._.slice(1);

let startTime = Date.now();
let ps;
Expand Down
6 changes: 6 additions & 0 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
args: ["run", "test/integration/test.ts"],
expect: { code: 0 }
},
{
args: ["build", "test/integration/test.ts", "-o", "tmp"],
expect (code, stdout, stderr) {
return stdout.toString().indexOf('tmp/index.js') !== -1;
}
},
{
args: ["run", "--v8-cache", "test/integration/test.ts"],
expect: { code: 0 }
Expand Down

0 comments on commit 421c19d

Please sign in to comment.