Skip to content

Commit fa65c2b

Browse files
committed
♻️ update old node code, prevent jslint exception
1 parent dbce0ce commit fa65c2b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build/jslint-check.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var JSLINT = require("./lib/jslint").JSLINT,
2-
print = require("sys").print,
2+
print = console.log,
33
src = require("fs").readFileSync("dist/jquery.js", "utf8");
44

55
JSLINT(src, { evil: true, forin: true, maxerr: 100 });
@@ -21,7 +21,7 @@ var e = JSLINT.errors, found = 0, w;
2121
for ( var i = 0; i < e.length; i++ ) {
2222
w = e[i];
2323

24-
if ( !ok[ w.reason ] ) {
24+
if ( w && !ok[ w.reason ] ) {
2525
found++;
2626
print( "\n" + w.evidence + "\n" );
2727
print( " Problem at line " + w.line + " character " + w.character + ": " + w.reason );

build/post-compile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
var print = require("sys").print,
3+
var print = console.log,
44
src = require("fs").readFileSync(process.argv[2], "utf8");
55

66
// Previously done in sed but reimplemented here due to portability issues

0 commit comments

Comments
 (0)