mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Skip slow npm-update step for warehouse packages, which should be write-once.
This commit is contained in:
@@ -406,7 +406,11 @@ _.extend(Bundle.prototype, {
|
||||
// what the current code will do)
|
||||
|
||||
if (pkg.npmDependencies) {
|
||||
pkg.installNpmDependencies();
|
||||
// If the package isn't in the warehouse, maybe update the NPM
|
||||
// dependencies. (Warehouse packages shouldn't change after they're
|
||||
// installed, so we skip this slow step.)
|
||||
if (!pkg.inWarehouse)
|
||||
pkg.installNpmDependencies();
|
||||
self.bundleNodeModules(pkg);
|
||||
}
|
||||
|
||||
@@ -432,7 +436,11 @@ _.extend(Bundle.prototype, {
|
||||
// tests. one example is stream-buffers as used in the email
|
||||
// package
|
||||
if (pkg.npmDependencies) {
|
||||
pkg.installNpmDependencies();
|
||||
// If the package isn't in the warehouse, maybe update the NPM
|
||||
// dependencies. (Warehouse packages shouldn't change after they're
|
||||
// installed, so we skip this slow step.)
|
||||
if (!pkg.inWarehouse)
|
||||
pkg.installNpmDependencies();
|
||||
self.bundleNodeModules(pkg);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@ var Package = function () {
|
||||
// registered source file handlers
|
||||
self.extensions = {};
|
||||
|
||||
// Are we in the warehouse? (Set to true by initFromWarehouse.) Used to skip
|
||||
// npm re-scans.
|
||||
self.inWarehouse = false;
|
||||
|
||||
// functions that can be called when the package is scanned --
|
||||
// visible as `Package` when package.js is executed
|
||||
self.packageFacade = {
|
||||
@@ -184,6 +188,7 @@ _.extend(Package.prototype, {
|
||||
self.initFromPackageDir(
|
||||
name,
|
||||
path.join(warehouse.getWarehouseDir(), 'packages', name, version));
|
||||
self.inWarehouse = true;
|
||||
},
|
||||
|
||||
init_from_app_dir: function (app_dir, ignore_files) {
|
||||
|
||||
Reference in New Issue
Block a user