File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ async function serve(options) {
7575 await fs . writeFile ( configFile , JSON . stringify ( config ) ) ;
7676
7777 await serveHttp2 ( {
78+ options,
7879 config : configFile ,
7980 configObj : config ,
8081 server : options . server ,
@@ -196,13 +197,13 @@ const SERVERS = {
196197 ] ;
197198 } ,
198199 /** Writes the firebase/superstatic/simplehttp2server configuration to stdout or a file. */
199- async config ( options ) {
200+ async config ( { configObj , options } ) {
200201 let dir = process . cwd ( ) ,
201202 outfile ;
202203 if ( options . dest && options . dest !== '-' ) {
203204 let isDir = false ;
204205 try {
205- isDir = ( await fs . stat ( ) ) . isDirectory ( ) ;
206+ isDir = ( await fs . stat ( options . dest ) ) . isDirectory ( ) ;
206207 } catch ( e ) { }
207208 if ( isDir ) {
208209 dir = options . dest ;
@@ -215,12 +216,13 @@ const SERVERS = {
215216 }
216217
217218 let config = JSON . stringify ( {
218- ...options . configObj ,
219- public : path . relative ( dir , options . configObj . public )
219+ ...configObj ,
220+ public : path . relative ( dir , configObj . public )
220221 } , null , 2 ) ;
221222
222223 if ( outfile ) {
223224 await fs . writeFile ( path . resolve ( dir , outfile ) , config ) ;
225+ return `Configuration written to ${ outfile } .` ;
224226 }
225227 else {
226228 return config ;
You can’t perform that action at this time.
0 commit comments