Skip to content

Commit

Permalink
Packages are their own dependencies.
Browse files Browse the repository at this point in the history
The dependencies of a package are itself (and therefore whatever it depends on).
This leads to a link being created from `.meteor/meteorite/packages/NAME` back to the current directory, and thus allowing us to run package tests, fixing oortcloud#62.
  • Loading branch information
tmeasday committed Nov 12, 2012
1 parent e863d78 commit d78a4b5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@ Project.prototype.checkSmartJson = function(forceUpdate) {
var config = new Config(this.root);

var newMeteor = new Meteor(config.meteor);
var newDeps = new Dependencies(config.packages);
// when running in the context of a package, we are the only required package
if (config.name) {
var specifier = {};
specifier[config.name] = {path: "."};
var newDeps = new Dependencies(specifier);
} else {
var newDeps = new Dependencies(config.packages);
}

if (forceUpdate || !this.meteor.equals(newMeteor) || !this.dependencies || !this.dependencies.equalBase(newDeps)) {

Expand Down

0 comments on commit d78a4b5

Please sign in to comment.