Skip to content

Commit cda361f

Browse files
Init add non interactive puter site deploy
1 parent df16d97 commit cda361f

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

bin/index.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,18 @@ async function main() {
6363
process.exit(0);
6464
});
6565

66-
/*/ Deploy command
67-
program
68-
.command('site:deploy')
66+
const site = program
67+
.command('site');
68+
69+
site
70+
.command('deploy')
6971
.description('Deploy a local web project to Puter')
70-
.argument('[remoteDir]', 'Remote directory path')
72+
.argument('<local_dir>', 'Local directory path')
7173
.option('--subdomain <subdomain>', 'Subdomain for the site')
72-
.action(async (name, remoteDir, options) => {
73-
try {
74-
await deploy([name, remoteDir, `--subdomain=${options.subdomain}`].filter(Boolean));
75-
} catch (error) {
76-
console.error(chalk.red(error.message));
77-
}
78-
process.exit(0);
74+
.action(async (local_dir, options) => {
75+
await startShell(`site:deploy ${local_dir}${options.subdomain ? ` --subdomain=${options.subdomain}`: ''}`)
76+
process.exit(0);
7977
});
80-
*/
8178

8279
if (process.argv.length === 2) {
8380
startShell();

0 commit comments

Comments
 (0)