Skip to content

Commit

Permalink
Merge pull request #103 from onmodulus/avoid-node-0-10-34
Browse files Browse the repository at this point in the history
Updated to specify the version of node
  • Loading branch information
Matt Hernandez committed Dec 18, 2014
2 parents 838c9fe + 8828438 commit 3903da9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/demeteorizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ Demeteorizer.prototype.createPackageJSON = function (context, callback) {
packageJSON.scripts = {
start: 'node main.js'
};
// FIXME: this is a hack to avoid defaulting to [email protected] which breaks some
// timer code.
packageJSON.engines = { node: '0.10.33' };
packageJSON.dependencies = context.dependencies;

fs.writeFileSync(context.paths.package_json, JSON.stringify(packageJSON, null, 2));
Expand Down
14 changes: 14 additions & 0 deletions spec/demeteorizer-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,18 @@ describe('demeteorizer lib', function () {
});
});

describe('#createPackageJSON', function () {
it('should create package.json with the correct fields', function () {
context.paths = {};
context.paths.package_json = './package.json';

fsStub.writeFileSync = function (path, data) {
path.should.equal('./package.json');
JSON.parse(data).engines.node.should.exist;
};

demeteorizer.createPackageJSON(context, new Function());
});
});

});

0 comments on commit 3903da9

Please sign in to comment.