bin/commands/install.js
function (module_name, module_folder, callback) {
    var module_folder = path.resolve(module_folder)
    var module_packaged = _load_package(module_folder);

    var module_dependencies = _.d.get(module_packaged, "/dependencies");
    if (!module_dependencies) {
        return callback();
    }

    module_dependencies = _.keys(module_dependencies);

    var _install_next = function() {
        if (module_dependencies.length === 0) {
            return callback();
        }

        var dname = module_dependencies.pop();
        var dependency_folder = path.join(module_folder, "node_modules", dname);
        var dependency_homestard = _load_homestar(dependency_folder);

        var is_module = _.d.get(dependency_homestard, "/module", false);
        if (!is_module) {
            return _install_next();
        }

        console.log("- found dependency:", dname);
        _install(dname, function() {
            try {
                console.log("- cleanup");
                console.log("  path:", dependency_folder);
                _rmdirSync(dependency_folder);
            } catch (x) {
            }

            _install_next();
        });
    }

    _install_next();
}
function (module_name, module_folder, callback) {
    var module_folder = path.resolve(module_folder)
    var module_packaged = _load_package(module_folder);

    var module_dependencies = _.d.get(module_packaged, "/dependencies");
    if (!module_dependencies) {
        return callback();
    }

    module_dependencies = _.keys(module_dependencies);

    var _install_next = function() {
        if (module_dependencies.length === 0) {
            return callback();
        }

        var dname = module_dependencies.pop();
        var dependency_folder = path.join(module_folder, "node_modules", dname);
        var dependency_homestard = _load_homestar(dependency_folder);

        var is_module = _.d.get(dependency_homestard, "/module", false);
        if (!is_module) {
            return _install_next();
        }

        console.log("- found dependency:", dname);
        _install(dname, function() {
            try {
                console.log("- cleanup");
                console.log("  path:", dependency_folder);
                _rmdirSync(dependency_folder);
            } catch (x) {
            }

            _install_next();
        });
    }

    _install_next();
}
function ( module_name , module_folder , callback ) { var module_folder = path . resolve ( module_folder ) var module_packaged = _load_package ( module_folder ) ; var module_dependencies = _ . d . get ( module_packaged , "/dependencies" ) ; if ( ! module_dependencies ) { return callback ( ) ; } module_dependencies = _ . keys ( module_dependencies ) ; var _install_next = function ( ) { if ( module_dependencies . length === 0 ) { return callback ( ) ; } var dname = module_dependencies . pop ( ) ; var dependency_folder = path . join ( module_folder , "node_modules" , dname ) ; var dependency_homestard = _load_homestar ( dependency_folder ) ; var is_module = _ . d . get ( dependency_homestard , "/module" , false ) ; if ( ! is_module ) { return _install_next ( ) ; } console . log ( "- found dependency:" , dname ) ; _install ( dname , function ( ) { try { console . log ( "- cleanup" ) ; console . log ( "  path:" , dependency_folder ) ; _rmdirSync ( dependency_folder ) ; } catch ( x ) { } _install_next ( ) ; } ) ; } _install_next ( ) ; }
homestar.dependencies can allow more things to be installed into homestar,
essentially recursively
homestar . dependencies can allow more things to be installed into homestar essentially recursively