Permalink
Browse files

Switch from sys module to util module

  • Loading branch information...
1 parent 626cd90 commit ce5b1ae45f1daeae2a1c1c674cf2f58e5c353e37 Robert Newson committed with ctavan Jan 19, 2012
Showing with 4 additions and 5 deletions.
  1. +2 −2 lib/nl/options.js
  2. +2 −3 scripts/jsmin.js
View
@@ -24,7 +24,7 @@
OTHER DEALINGS IN THE SOFTWARE.
*/
-var sys = require('sys');
+var util = require('util');
var url = require('url');
var path = require('path');
var optparse = require('optparse');
@@ -60,7 +60,7 @@ var switches = [
var parser;
var help = exports.help = function() {
- sys.puts(parser);
+ util.log(parser);
process.exit();
};
View
@@ -366,11 +366,10 @@ function jsmin(input, level, comment) {
}
// Make jsmin a runnable application
-var sys = require('sys');
if (process.argv.length == 3) {
// Read from file and write to stdout
var fs = require('fs');
- input = fs.readFile(process.argv[2], 'binary', function(err, data) { sys.puts(data) });
+ input = fs.readFile(process.argv[2], 'binary', function(err, data) { console.log(data) });
} else {
// Read from stdin and write to stdout
var stdin = process.openStdin();
@@ -379,6 +378,6 @@ if (process.argv.length == 3) {
input += chunk;
});
stdin.on('end', function () {
- sys.puts(jsmin(input));
+ console.log(jsmin(input));
});
}

0 comments on commit ce5b1ae

Please sign in to comment.