Skip to content

Commit 45e6cba

Browse files
committed
remove args.ts file
1 parent 447f58c commit 45e6cba

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

packages/cloudflare/src/cli/args.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
#!/usr/bin/env node
2-
import { runCommand } from "./args.js";
2+
3+
import yargs from "yargs";
4+
5+
import { addBuildCommand } from "./commands/build.js";
6+
import { addDeployCommand } from "./commands/deploy.js";
7+
import { addPopulateCacheCommand } from "./commands/populate-cache.js";
8+
import { addPreviewCommand } from "./commands/preview.js";
9+
import { addUploadCommand } from "./commands/upload.js";
10+
11+
export function runCommand() {
12+
let y = yargs(process.argv.slice(2))
13+
.scriptName("opennextjs-cloudflare")
14+
.parserConfiguration({ "unknown-options-as-args": true });
15+
16+
y = addBuildCommand(y);
17+
y = addPreviewCommand(y);
18+
y = addDeployCommand(y);
19+
y = addUploadCommand(y);
20+
y = addPopulateCacheCommand(y);
21+
22+
return y.demandCommand(1, 1).parse();
23+
}
324

425
await runCommand();

0 commit comments

Comments
 (0)