How to use the debug function from cli
Find comprehensive JavaScript cli.debug code examples handpicked from public code repositorys.
GitHub: vishaltelangre/music-dl
40 41 42 43 44 45 46 47 48 49
resolve({listTitle: data.listTitle, trackList}); } catch (error) { reject(`Error while parsing the list of tracks on the provided link`); } }) .log(message => { process.env.DEBUG && cli.debug(message); }) .error(err => { if (err.match(/no results/)) reject("Couldn't find any tracks on the provided link") else
20
108
4
GitHub: deadratfink/jy-transform
52 53 54 55 56 57 58 59 60 61
*/ function error(err) { cli.error('////////////////////////////////////////////////////////////////////////////////'); cli.error(err); if (err.stack) { cli.debug(err.stack); } cli.error('////////////////////////////////////////////////////////////////////////////////'); cli.getUsage(1); }
0
6
0
+ 3 other calls in file
GitHub: deadratfink/pkg2md
79 80 81 82 83 84 85 86 87
*/ function mainCb(args, options) { // CLI debug cli.debug('application: ' + cli.app); cli.debug('parsed args: ' + JSON.stringify(args, null, 4)); cli.debug('parsed options: ' + JSON.stringify(options, null, 4)); cli.debug('raw process args: ' + JSON.stringify(process.argv, null, 4));
0
2
2
+ 31 other calls in file
108 109 110 111 112 113 114 115 116 117
}); }); } function installPackage(descriptor, options, packageDir, fromLocal) { cli.debug("got descriptor" + util.inspect(descriptor)); var installTo = options.installDir + path.sep + descriptor.id; if (fs.existsSync(installTo)) { throw new Error("already have existing package at " + installTo); }
0
0
12
+ 23 other calls in file