-
Notifications
You must be signed in to change notification settings - Fork 20
/
deploy.ts
60 lines (59 loc) 路 1.43 KB
/
deploy.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import consola from "consola";
import { defineCommand } from "../../src";
export default defineCommand({
meta: {
name: "deploy",
description: "Deploy the bundle output to the cloud.",
},
args: {
exclude: {
type: "string",
valueHint: "PATTERNS",
description: "Exclude files that match this pattern",
},
include: {
type: "string",
valueHint: "PATTERNS",
description: "Only upload files that match this pattern",
},
importMap: {
type: "string",
valueHint: "FILE",
description: "Use import map file",
},
static: {
type: "boolean",
description: "Don't include the files in the CWD as static files",
default: false,
},
prod: {
type: "boolean",
description:
"Create a production deployment (default is preview deployment)",
},
project: {
type: "string",
alias: "p",
valueHint: "NAME",
description: "The project to deploy to",
},
token: {
type: "string",
valueHint: "TOKEN",
description: "The API token to use (defaults to DEPLOY_TOKEN env var)",
},
dryRun: {
type: "boolean",
description: "Dry run the deployment process",
},
provider: {
type: "positional",
description: "Deployment provider",
valueHint: "foo|bar|baz|qux",
},
},
run({ args }) {
consola.log("Build");
consola.log("Parsed args:", args);
},
});