mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
a4444c5462
PR-URL: https://github.com/nodejs/node/pull/13487 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
19 lines
628 B
JavaScript
19 lines
628 B
JavaScript
'use strict'
|
|
|
|
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)
|
|
})
|
|
}
|