nl_tokens: ### _tokenFlow
pl_tokens: function _tokenFlow ( ) { const defer = vow . defer ( ) let prompt const authUrl = oauth . generateAuthUrl ( { access_type : 'offline' , scope : [ 'https://www.googleapis.com/auth/drive.readonly' ] } ) console . log ( 'authorise metalsmith-google-drive by visiting: ' , authUrl ) prompt = readline . createInterface ( { input : process . stdin , output : process . stdout } ) prompt . question ( 'Enter the code from that page here (or "ok" to skip scrape): ' , ( code ) => { prompt . close ( ) if ( code === 'ok' ) return defer . reject ( 'skip' ) oauth . getToken ( code , ( err , result ) => { if ( err ) { dbg ( err ) defer . reject ( err ) } else { console . log ( '---------- snip ----------' ) console . log ( hjson . stringify ( { 'metalsmith-google-drive' : { token : result } } , { separator : true , spaces : 2 , bracesSameLine : true , quotes : 'all' } ) ) console . log ( '---------- snip ----------' ) console . log ( 'this token is cached automatically, but you can store' ) console . log ( 'it in a config file like config/local.js if you want.' ) valueCache . store ( 'token' , <mask> ) defer . resolve ( result ) } } ) } ) return defer . promise ( ) }