import program from 'commander' ; import { download2prj } from './api' ; /** binary entry
 * https://github.com/tj/commander.js/
 *
 */ function entry ( ) { const args = process . argv ; program . version ( '0.1.0' ) . option ( '-p, --project' , 'project id from dashboard' ) . parse ( args ) ; const argParsed = program . parse ( args ) . opts ( ) ; let pid = args [ 3 ] ; if ( ! argParsed . project === null ) pid = argParsed . project ; if ( pid === null ) console . log ( 'please provide project id from dashboard' ) ; console . log ( pid ) ; download2prj ( pid ) ; } entry ( ) ;