Skip to content

Commit 8240d5d

Browse files
Improve site deploy argument add desc
1 parent cda361f commit 8240d5d

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

bin/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,16 @@ async function main() {
6464
});
6565

6666
const site = program
67-
.command('site');
67+
.command('site')
68+
.description('Site management commands');
6869

6970
site
7071
.command('deploy')
7172
.description('Deploy a local web project to Puter')
7273
.argument('<local_dir>', 'Local directory path')
73-
.option('--subdomain <subdomain>', 'Subdomain for the site')
74-
.action(async (local_dir, options) => {
75-
await startShell(`site:deploy ${local_dir}${options.subdomain ? ` --subdomain=${options.subdomain}`: ''}`)
74+
.argument('[<subdomain>]', 'Deployment subdomain (<subdomain>.puter.site)')
75+
.action(async (local_dir, subdomain) => {
76+
await startShell(`site:deploy ${local_dir}${subdomain ? ` --subdomain=${subdomain}`: ''}`)
7677
process.exit(0);
7778
});
7879

dist/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>hehe</title>
7+
</head>
8+
<body>
9+
<h1>hehe</h1>
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)