Browse Source

now-list: style

master
Guillermo Rauch 9 years ago
parent
commit
5cf2ebe45b
  1. 6
      bin/now-list

6
bin/now-list

@ -75,10 +75,10 @@ async function list (token) {
const current = Date.now(); const current = Date.now();
const text = sorted.map(([name, deps]) => { const text = sorted.map(([name, deps]) => {
const t = table(deps.map(({ uid, url, created }) => { const t = table(deps.map(({ uid, url, created }) => {
const time = ms(current - created) + ' ago'; const time = chalk.gray(ms(current - created) + ' ago');
return [ uid, time, `https://${url}` ]; return [ uid, time, `https://${url}` ];
}), { align: ['l', 'r', 'l'], hsep: ' '.repeat(8) }); }), { align: ['l', 'r', 'l'], hsep: ' '.repeat(6) });
return chalk.bold(name) + '\n\n' + indent(t, 2).split('\n').join('\n\n'); return chalk.bold(name) + '\n\n' + indent(t, 2);
}).join('\n\n'); }).join('\n\n');
if (text) console.log('\n' + text + '\n'); if (text) console.log('\n' + text + '\n');

Loading…
Cancel
Save