@@ -4,35 +4,31 @@ import {ServeCommand} from './commands/serve';
4
4
import { UploadCommand } from './commands/upload' ;
5
5
import { createCommand } from 'commander' ;
6
6
7
- async function main ( ) {
8
- const program = createCommand ( ) ;
7
+ const program = createCommand ( ) ;
9
8
10
- program
11
- . command ( 'upload [dir]' )
12
- . description ( 'Uploads a directory to cloud storage' )
13
- . option ( '-p, --google-cloud-project <project>' , 'project' , '' )
14
- . option ( '-s, --site <site>' , 'site' , '' )
15
- . option ( '-r, --ref <ref>' , 'ref' , '' )
16
- . option ( '-b, --branch <branch>' , 'branch' , '' )
17
- . option ( '-f, --force' , 'force' , false )
18
- . option ( '-t, --ttl <ttl>' , 'ttl' , undefined )
19
- . option ( '-o, --output-file <path>' , 'output file' , '' )
20
- . action ( async ( path , options ) => {
21
- const cmd = new UploadCommand ( options ) ;
22
- await cmd . run ( path ) ;
23
- } ) ;
9
+ program
10
+ . command ( 'upload [dir]' )
11
+ . description ( 'Uploads a directory to cloud storage' )
12
+ . option ( '-p, --google-cloud-project <project>' , 'project' , '' )
13
+ . option ( '-s, --site <site>' , 'site' , '' )
14
+ . option ( '-r, --ref <ref>' , 'ref' , '' )
15
+ . option ( '-b, --branch <branch>' , 'branch' , '' )
16
+ . option ( '-f, --force' , 'force' , false )
17
+ . option ( '-t, --ttl <ttl>' , 'ttl' , undefined )
18
+ . option ( '-o, --output-file <path>' , 'output file' , '' )
19
+ . action ( async ( path , options ) => {
20
+ const cmd = new UploadCommand ( options ) ;
21
+ await cmd . run ( path ) ;
22
+ } ) ;
24
23
25
- program
26
- . command ( 'serve' )
27
- . description ( 'Runs the server' )
28
- . option ( '-s, --site <site>' , 'site' , '' )
29
- . option ( '-r, --ref <ref>' , 'ref' , '' )
30
- . action ( options => {
31
- const cmd = new ServeCommand ( options ) ;
32
- cmd . run ( ) ;
33
- } ) ;
24
+ program
25
+ . command ( 'serve' )
26
+ . description ( 'Runs the server' )
27
+ . option ( '-s, --site <site>' , 'site' , '' )
28
+ . option ( '-r, --ref <ref>' , 'ref' , '' )
29
+ . action ( options => {
30
+ const cmd = new ServeCommand ( options ) ;
31
+ cmd . run ( ) ;
32
+ } ) ;
34
33
35
- await program . parseAsync ( process . argv ) ;
36
- }
37
-
38
- main ( ) ;
34
+ program . parse ( process . argv ) ;
0 commit comments