1const Arborist = require('../') 2 3const printTree = require('./lib/print-tree.js') 4 5module.exports = (options, time) => new Arborist(options) 6 .loadVirtual() 7 .then(time) 8 .then(async ({ timing, result: tree }) => { 9 printTree(tree) 10 if (options.save) { 11 await tree.meta.save() 12 } 13 return `read ${tree.inventory.size} deps in ${timing.ms}` 14 }) 15