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

inflate-bundled.js « install « lib - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 168c8b0640d6dbe168e647a4444cd5e53faf1384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict'
var validate = require('aproba')
var childPath = require('../utils/child-path.js')
var reset = require('./node.js').reset

module.exports = function inflateBundled (bundler, parent, children) {
  children.forEach(function (child) {
    if (child.fromBundle === bundler) return
    reset(child)
    child.fromBundle = bundler
    child.isInLink = bundler.isLink
    child.parent = parent
    child.path = childPath(parent.path, child)
    child.realpath = bundler.isLink ? child.realpath : childPath(parent.realpath, child)
    child.isLink = child.isLink || parent.isLink || parent.target
    inflateBundled(bundler, child, child.children)
  })
}