File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,18 +7,18 @@ import { getSubdomains } from './subdomains.js';
77
88/**
99 * Deploy a local web project to Puter.
10- * @param {string[] } args - Command-line arguments (e.g., <valid_site_app> [<remote_dir>] [--subdomain=<subdomain>]).
10+ * @param {string[] } args - Command-line arguments (e.g., [<remote_dir>] [--subdomain=<subdomain>]).
1111 */
1212export async function deploy ( args = [ ] ) {
1313 if ( args . length < 1 || ! isValidAppName ( args [ 0 ] ) ) {
14- console . log ( chalk . red ( 'Usage: site:deploy <valid_site_app> [<remote_dir>] [--subdomain=<subdomain>]' ) ) ;
14+ console . log ( chalk . red ( 'Usage: site:deploy [<remote_dir>] [--subdomain=<subdomain>]' ) ) ;
1515 console . log ( chalk . yellow ( 'Example: site:deploy' ) ) ;
16- console . log ( chalk . yellow ( 'Example: site:deploy my-app ' ) ) ;
17- console . log ( chalk . yellow ( 'Example: site:deploy my-app ./my-app' ) ) ;
18- console . log ( chalk . yellow ( 'Example: site:deploy my-app ./my-app --subdomain=my-app-new' ) ) ;
16+ console . log ( chalk . yellow ( 'Example: site:deploy' ) ) ;
17+ console . log ( chalk . yellow ( 'Example: site:deploy ./my-app' ) ) ;
18+ console . log ( chalk . yellow ( 'Example: site:deploy ./my-app --subdomain=my-app-new' ) ) ;
1919 return ;
2020 }
21- const appName = args [ 0 ] ; // && !args[0].startsWith('--') ? args[0] : generateAppName();
21+ const appName = generateAppName ( ) ;
2222 const remoteDirArg = args . find ( arg => ! arg . startsWith ( '--' ) && arg !== appName ) ;
2323 const remoteDir = remoteDirArg || '.' ; // `./${appName}`;
2424 const subdomain = args . find ( arg => arg . startsWith ( '--subdomain=' ) ) ?. split ( '=' ) [ 1 ] || appName ;
You can’t perform that action at this time.
0 commit comments