55 */
66import { readFileSync } from 'fs-extra' ;
77import { join } from 'path' ;
8- import * as yargs from 'yargs' ;
98import './pluginManagement/systemPlugins' ;
109import { startBackgroundServer } from './startBackgroundServer' ;
1110import { loadConfig } from './utils/config' ;
@@ -16,28 +15,11 @@ import {logError, logWarn, yellow} from './utils/log';
1615import { startScully } from './utils/startup' ;
1716import { waitForServerToBeAvailable } from './utils/waitForServerToBeAvailable' ;
1817import { bootServe , isBuildThere , watchMode } from './watchMode' ;
18+ import { watch , removeStaticDist } from './utils/cli-options' ;
1919
2020/** the default of 10 is too shallow for generating pages. */
2121require ( 'events' ) . defaultMaxListeners = 100 ;
2222
23- const { argv : options } = yargs . option ( 'port' , {
24- alias : 'p' ,
25- type : 'number' ,
26- description : 'The port to run on' ,
27- } ) ;
28-
29- const { watch} = yargs
30- . boolean ( 'wm' )
31- . default ( 'wm' , false )
32- . alias ( 'wm' , 'watch' )
33- . describe ( 'wm' , 'Use this flag for use the watch mode into scully' ) . argv ;
34-
35- const { removeStaticDist} = yargs
36- . boolean ( 'RSD' )
37- . default ( 'RSD' , false )
38- . alias ( 'RSD' , 'removeStaticDist' )
39- . describe ( 'RSD' , 'Use this flag to remove the Scully outfolder before starting' ) . argv ;
40-
4123if ( process . argv . includes ( 'version' ) ) {
4224 const { version} = JSON . parse ( readFileSync ( join ( __dirname , './package.json' ) ) . toString ( ) ) ;
4325 console . log ( 'version:' , version ) ;
0 commit comments