Permalink
Browse files

add "main" section to package.json to enable require in npm

  • Loading branch information...
bkw committed Oct 28, 2012
1 parent 0552ba2 commit 6d8fa1b40c330bfc4568b2fea5087bf465bf7d1b
Showing with 10 additions and 0 deletions.
  1. +2 −0 package.json
  2. +8 −0 tests/stable/regression/npm.js
View
@@ -15,6 +15,8 @@
"lint": "node ./make.js lint"
},
+ "main": "./src/stable/jshint.js",
+
"dependencies": {
"esprima": "https://github.com/ariya/esprima/tarball/master",
"shelljs": "*",
@@ -0,0 +1,8 @@
+"use strict";
+
+exports.npm = function (test) {
+ var jshint;
+ test.ok(jshint = require(__dirname + '/../../../'));
+ test.equal(typeof(jshint.JSHINT), 'function');
+ test.done();
+};

0 comments on commit 6d8fa1b

Please sign in to comment.