How to use the backupDir function from commander

Find comprehensive JavaScript commander.backupDir code examples handpicked from public code repositorys.

25
26
27
28
29
30
31
32
33
34
  .option('-c, --category <category>', 'category (base directory) to back up')
  .option('-p, --include-public', 'when backing up a single category, include the public folder of that category')
  .option('-r, --rate-limit <time>', 'time interval for network requests in ms (default is 20)')
  .parse(process.argv);

const backupDir     = program.backupDir;
const category      = program.category || '';
const includePublic = program.includePublic || false;
const authScope     = category.length > 0 ? category+':rw' : '*:rw';
const rateLimit     = program.rateLimit || 20;
fork icon2
star icon12
watch icon2

+ 5 other calls in file

Other functions in commander

Sorted by popularity

function icon

commander.Option is the most popular function in commander (1786 examples)