lib/bundleLocator.js
function (dir, options) {
        var self = this,
            bundleSeeds;

        // Normalize the root directory before storing its value. If it is
        // stored before normalizing, other paths created afterwards may be
        // normalized and fail comparisons against the root directory
        dir = libpath.normalize(dir);

        this._rootDirectory = dir;

        bundleSeeds = this._walkNPMTree(dir);
        bundleSeeds = this._filterBundleSeeds(bundleSeeds);
        bundleSeeds.forEach(function (bundleSeed) {
            var opts = (bundleSeed.baseDirectory === dir) ? options : {};
            self._walkBundle(bundleSeed, opts);
        });
        this._rootBundleName = this._bundlePaths[libfs.realpathSync(dir)];
        return this._bundles[this._rootBundleName];
    }
function (dir, options) {
        var self = this,
            bundleSeeds;

        // Normalize the root directory before storing its value. If it is
        // stored before normalizing, other paths created afterwards may be
        // normalized and fail comparisons against the root directory
        dir = libpath.normalize(dir);

        this._rootDirectory = dir;

        bundleSeeds = this._walkNPMTree(dir);
        bundleSeeds = this._filterBundleSeeds(bundleSeeds);
        bundleSeeds.forEach(function (bundleSeed) {
            var opts = (bundleSeed.baseDirectory === dir) ? options : {};
            self._walkBundle(bundleSeed, opts);
        });
        this._rootBundleName = this._bundlePaths[libfs.realpathSync(dir)];
        return this._bundles[this._rootBundleName];
    }
function ( dir , options ) { var self = this , bundleSeeds ; // Normalize the root directory before storing its value. If it is // stored before normalizing, other paths created afterwards may be // normalized and fail comparisons against the root directory dir = libpath . normalize ( dir ) ; this . _rootDirectory = dir ; bundleSeeds = this . _walkNPMTree ( dir ) ; bundleSeeds = this . _filterBundleSeeds ( bundleSeeds ) ; bundleSeeds . forEach ( function ( bundleSeed ) { var opts = ( bundleSeed . baseDirectory === dir ) ? options : { } ; self . _walkBundle ( bundleSeed , opts ) ; } ) ; this . _rootBundleName = this . _bundlePaths [ libfs . realpathSync ( dir ) ] ; return this . _bundles [ this . _rootBundleName ] ; }
Parses the directory to turn it into a bundle.
@method parseBundle
@param {string} dir The directory for the bundle.
@param {object} [options] Options for processing the bundle.

@example (note constructor "BundleLocator" is exported as "Locator")
var locator = new Locator();
var appBundle = locator.parseBundle(__dirname, {});

@return {Bundle} The bundle.
Parses the directory to turn it into a bundle . @method parseBundle @param { string } dir The directory for the bundle . @param { object } [ options ] Options for processing the bundle .