import log from 'fancy-log' ; import getopts from 'getopts' ; const opts = Object . freeze ( getopts ( process . argv . slice ( 2 ) , { alias : { release : 'r' , } , boolean : [ 'release' , 'flags' ] , string : [ 'build-qualifier' , 'plugins' ] , } ) ) ; if ( opts . flags ) { log ( `
  X-Pack Gulpfile Flags:

    --flags            Print this message
    --plugins          Comma-separated list of plugins
    --release, -r      Build to a release version
    --build-qualifier  Qualifier to include in the build version
  ` ) ; process . exit ( 0 ) ; } export const FLAGS = { release : ! ! opts . release , buildQualifier : opts . buildQualifier as string | undefined , plugins : opts . plugins ? String ( opts . plugins ) . split ( ',' ) . map ( ( id ) => id . trim ( ) ) : undefined , } ;