Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Upgrade Browserify to 2.12.0

This should improve performance on Rhino and resolve EventEmitter
leaks.

Closes GH-983.
Closes GH-958.
Closes GH-931.
Closes GH-889.
Affects GH-987.
  • Loading branch information...
commit f2843c52940392c1e493f6fdfb768e5dbd22ac83 1 parent af28e2e
@valueof valueof authored
Showing with 24 additions and 21 deletions.
  1. +23 −20 make.js
  2. +1 −1  package.json
View
43 make.js
@@ -17,7 +17,6 @@ var TESTS = [
var OPTIONS = JSON.parse(cat("./jshint.json"));
target.all = function () {
- target.build();

"node make" isn't building into the dist directory

@valueof Owner
valueof added a note

This is intentional. you need to run node make.is build.

Very cool. There are some spots that needs updating then... E.g. http://jshint.com/hack/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
target.lint();
target.test();
};
@@ -100,9 +99,7 @@ target.test = function () {
target.build = function () {
var browserify = require("browserify");
- var bundle = browserify({ debug: true });
-
- bundle.addEntry("./src/stable/jshint.js");
+ var bundle = browserify("./src/stable/jshint.js");
if (!test("-e", "./dist")) {
mkdir("./dist");
@@ -110,20 +107,26 @@ target.build = function () {
echo("Building into dist/...", "\n");
- bundle.append("JSHINT = require('/src/stable/jshint.js').JSHINT;");
-
- [ "// " + pkg.version,
- "var JSHINT;",
- bundle.bundle()
- ].join("\n").to("./dist/jshint-" + pkg.version + ".js");
-
- cli.ok("Bundle");
-
- // Rhino
- var rhino = cat("./dist/jshint-" + pkg.version + ".js", "./src/platforms/rhino.js");
- rhino = "#!/usr/bin/env rhino\n\n" + rhino;
- rhino.to("./dist/jshint-rhino-" + pkg.version + ".js");
- exec("chmod +x dist/jshint-rhino-" + pkg.version + ".js");
- cli.ok("Rhino");
- echo("\n");
+ bundle.require("./src/stable/jshint.js", { expose: "jshint" });
+ bundle.bundle({}, function (err, src) {
+ [
+ "//" + pkg.version,
+ "var JSHINT;",
+ "(function () {",
+ "var require;",
+ src,
+ "JSHINT = require('jshint').JSHINT;",
+ "}());"
+ ].join("\n").to("./dist/jshint-" + pkg.version + ".js");
+
+ cli.ok("Bundle");
+
+ // Rhino
+ var rhino = cat("./dist/jshint-" + pkg.version + ".js", "./src/platforms/rhino.js");
+ rhino = "#!/usr/bin/env rhino\n\n" + "var window = {};" + rhino;
+ rhino.to("./dist/jshint-rhino-" + pkg.version + ".js");
+ exec("chmod +x dist/jshint-rhino-" + pkg.version + ".js");
+ cli.ok("Rhino");
+ echo("\n");
+ });
};
View
2  package.json
@@ -33,7 +33,7 @@
"devDependencies": {
"jshint": "1.1.0",
"shelljs": "0.1.x",
- "browserify": "1.16.1",
+ "browserify": "2.12.x",
"coveraje": "0.2.x",
"nodeunit": "0.7.x",
"sinon": "1.6.x",

1 comment on commit f2843c5

@MiguelCastillo

Yay, this fixes the EventEmitter problem! :+1:

Please sign in to comment.
Something went wrong with that request. Please try again.