nl_tokens: snap <boilerplate - name > <project - directory > [ - i ] create a new project with a boilerplate
pl_tokens: function snap ( bplateName , projectDir , options ) { // find the boilerplate const bplate = path . join ( os . homedir ( ) , '.snap' , bplateName ) ; if ( ! fs . pathExistsSync ( bplate ) ) { console . log ( ` \n ${ chalk . red ( 'Error:' ) } ${ chalk . yellow ( bplateName ) } \n ` ) ; return ; } const projectPath = path . resolve ( projectDir ) ; // check if the project directory is already taken if ( fs . pathExistsSync ( projectPath ) ) { console . log ( ` \n ${ chalk . red ( 'Error:' ) } ${ chalk . cyan ( projectPath ) } \n ` ) ; return ; } // copy the boilerplate console . log ( '\nCopying...' ) ; fs . copySync ( bplate , projectPath ) ; if ( options . install ) { console . log ( ` ${ chalk . yellow ( 'npm install' ) } ` ) ; shell . exec ( ` ${ projectDir } ` ) ; } console . log ( chalk . <mask> ( '\nSuccess! ＼(＾O＾)／')); console . log ( ` ${ chalk . yellow ( ` ${ projectDir } ` ) } \n ` ) ; }