File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { getSubdomains } from './subdomains.js';
1010 * @param {string[] } args - Command-line arguments (e.g., [<remote_dir>] [--subdomain=<subdomain>]).
1111 */
1212export async function deploy ( args = [ ] ) {
13- if ( args . length < 1 || ! isValidAppName ( args [ 0 ] ) ) {
13+ if ( args . length > 2 || args . some ( arg => arg . startsWith ( '--' ) && ! arg . startsWith ( '--subdomain=' ) ) ) {
1414 console . log ( chalk . red ( 'Usage: site:deploy [<remote_dir>] [--subdomain=<subdomain>]' ) ) ;
1515 console . log ( chalk . yellow ( 'Example: site:deploy' ) ) ;
1616 console . log ( chalk . yellow ( 'Example: site:deploy' ) ) ;
@@ -19,8 +19,8 @@ export async function deploy(args = []) {
1919 return ;
2020 }
2121 const appName = generateAppName ( ) ;
22- const remoteDirArg = args . find ( arg => ! arg . startsWith ( '--' ) && arg !== appName ) ;
23- const remoteDir = remoteDirArg || '.' ; // `./${appName}`;
22+ const remoteDirArg = args . find ( arg => ! arg . startsWith ( '--' ) ) ;
23+ const remoteDir = remoteDirArg || '.' ;
2424 const subdomain = args . find ( arg => arg . startsWith ( '--subdomain=' ) ) ?. split ( '=' ) [ 1 ] || appName ;
2525 const sourceDir = '.' ; // Deploy from the current directory
2626
You can’t perform that action at this time.
0 commit comments