How to use the newGroup function from npmlog
Find comprehensive JavaScript npmlog.newGroup code examples handpicked from public code repositorys.
GitHub: paytm/npmlog
158 159 160 161 162 163 164 165 166 167
This adds a new `are-we-there-yet` stream tracker to the progress tracker. The object returned has the `log[level]` methods but is otherwise an `are-we-there-yet` `TrackerStream` object. ## log.newGroup(name, weight) This adds a new `are-we-there-yet` tracker group to the progress tracker. The object returned has the `log[level]` methods but is otherwise an `are-we-there-yet` `TrackerGroup` object.
61
0
21
+ 13 other calls in file
GitHub: LinusU/packard
167 168 169 170 171 172 173 174 175 176
log.silly('inspect', 'argv', argv) log.silly('inspect', 'things', things) log.enableProgress() Promise.map(things, f => { groups.set(basename(f), log.newGroup(f)) return flac.scan({path: f}, groups) }) .map(b => { b.flacTrack = Track.fromFLAC(b.metadata, b.path, b.stats)
1
0
3
GitHub: Saartje87/nbob
5 6 7 8 9 10 11 12 13 14
var Promise = require('./promise'); var MAX_PREFIX_LENGTH = 12; var nrTrackers = 0; var loggerMap = {}; var trackerGroup = log.newGroup(); function enOrDisAbleProgress() { if (nrTrackers > 0) { log.enableProgress();
1
0
2
+ 3 other calls in file
GitHub: LinusU/packard
40 41 42 43 44 45 46 47 48 49
log.disableProgress() process.exit(0) } log.verbose('unpack', 'processing', files) files.forEach(f => groups.set(f, log.newGroup('process: ' + f))) return Promise.map( files, f => extractRelease(f, tmpdir, covers, groups), {concurrency: 2}
1
0
3
30 31 32 33 34 35 36 37 38 39
// starts progress bar if (this[_setProgress] && this[_progress].size === 0) { npmlog.enableProgress() } this[_progress].set(section, npmlog.newGroup(section)) } else if (!hasTracker && subsection !== null) { // 2. no parent tracker and subsection this[_onError](`Parent tracker "${section}" does not exist`) } else if (!hasTracker || !hasSubtracker) {
0
0
1
+ 20 other calls in file
516 517 518 519 520 521 522 523 524 525 526
}) }, function () { if (linkTodoList.length === 0) return cb() self.differences.length = 0 Array.prototype.push.apply(self.differences, linkTodoList) diffTrees(self.currentTree, self.idealTree, self.differences, log.newGroup('d2'), cb) }) } function isLinkable (pkg, cb) {
0
0
0
GitHub: KingKzear/lerna
195 196 197 198 199 200 201 202 203 204
// handle log.success() log.addLevel("success", 3001, { fg: "green", bold: true }); // create logger that subclasses use Object.defineProperty(this, "logger", { value: log.newGroup(this.name), }); // emit all buffered logs at configured level and higher log.resume();
0
0
0
GitHub: stillczw/IT-Project
45 46 47 48 49 50 51 52 53 54
// requires fail if you replace the exports object, and we do, not in deps, but // in a dep of it. var recalculateMetadata = require('../install/deps.js').recalculateMetadata readPackageTree(folder, pulseTillDone('pack:readTree:' + packageId(pkg), iferr(cb, function (tree) { var recalcGroup = log.newGroup('pack:recalc:' + packageId(pkg)) recalculateMetadata(tree, recalcGroup, iferr(cb, function () { recalcGroup.finish() pack_(tarball, folder, tree, pkg, pulseTillDone('pack:' + packageId(pkg), cb)) }))
0
0
0
16 17 18 19 20 21 22 23 24 25 26
}) test('validate-tree', function (t) { log.disableProgress() var validateTree = require('../../lib/install/validate-tree.js') validateTree(idealTree, log.newGroup('validate'), function (er) { t.pass("we didn't crash") t.end() }) })
0
0
0
GitHub: stillczw/IT-Project
352 353 354 355 356 357 358 359 360 361 362
todo.push([this, this.readGlobalPackageData]) } else { todo.push([this, this.readLocalPackageData]) } todo.push( [this, this.normalizeTree, log.newGroup('normalizeTree')]) chain(todo, cb) } Installer.prototype.loadIdealTree = function (cb) {
0
0
0
npmlog.verbose is the most popular function in npmlog (7425 examples)