const log = { } ; description param { String } type function typeColor ( type = 'default' ) { let color = '' ; switch ( type ) { case 'default' : color = '#35495E' ; break ; case 'primary' : color = '#3488ff' ; break ; case 'success' : color = '#43B883' ; break ; case 'warning' : color = '#e6a23c' ; break ; case 'danger' : color = '#f56c6c' ; break ; default : ; break ; } return color ; } description param { String } title param { String } info param { String } type log . capsule = function ( title , info , type = 'primary' ) { console . info ( `%c ${ title } %c ${ info } %c` , 'background:#42B983; padding: 4px; border-radius: 3px 0 0 3px; color: #fff;' , `background:${ typeColor ( 'default' ) }; padding: 4px; border-radius: 0 3px 3px 0;  color: #fff;` , 'background:transparent' ) ; } ; description log . colorful = function ( textArr ) { console . info ( `%c${ textArr . map ( t => t . text || '' ) . join ( '%c' ) }` , ... textArr . map ( t => `color: ${ typeColor ( t . type ) };` ) ) ; } ; description log . default = function ( text ) { log . colorful ( [ { text } ] ) ; } ; description log . primary = function ( text ) { log . colorful ( [ { text , type : 'primary' } ] ) ; } ; description log . success = function ( text ) { log . colorful ( [ { text , type : 'success' } ] ) ; } ; description log . warning = function ( text ) { log . colorful ( [ { text , type : 'warning' } ] ) ; } ; description log . danger = function ( text ) { log . colorful ( [ { text , type : 'danger' } ] ) ; } ; export function versionShow ( ) { log . capsule ( `${ process . env . VUE_APP_NAME }` , `v${ process . env . VUE_APP_VERSION }` ) ; log . success ( `Build Time:  ${ process . env . VUE_APP_BUILD_TIME }` ) ; log . success ( `Last Commit: ${ process . env . VUE_APP_LAST_COMMIT }` ) ; }