import yargs from 'yargs' ; import config from './config' ; import { errorHandler } from './util' ; ( config . isDevMode || config . isTestMode ) && require ( 'source-map-support/register' ) ; const usageText = `
Blockchain Deploy Kit

      ::::::::    :::::::     :::    :::
     :+:   :+:   :+:   :+:   :+:   :+:
    +:+    +:+  +:+    +:+  +:+  +:+
   +#++:++#+   +#+    +:+  +#++:++
  +#+    +#+  +#+    +#+  +#+  +#+
 #+#   #+#   #+#   #+#   #+#   #+#
########    ########    ###    ###
` ; const argv = yargs . commandDir ( 'command' ) . strict ( ) . demandCommand ( ) . completion ( ) . usage ( usageText ) . fail ( ( msg , err , _yargs ) => { if ( err ) errorHandler ( err ) ; else console . error ( _yargs . help ( ) , '\n\n' , msg ) ; process . exit ( 1 ) ; } ) . argv ;