Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ideal.js « bin « arborist « workspaces - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1dd206e81ff1bdcaf1f83ef481bec923eb1f1bd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const Arborist = require('../')

const printTree = require('./lib/print-tree.js')

module.exports = (options, time) => new Arborist(options)
  .buildIdealTree(options)
  .then(time)
  .then(async ({ timing, result: tree }) => {
    printTree(tree)
    if (tree.meta && options.save) {
      await tree.meta.save()
    }
    return `resolved ${tree.inventory.size} deps in ${timing.seconds}`
  })