Skip to content

Commit

Permalink
Switch from sys module to util module
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Newson authored and ctavan committed Jan 30, 2012
1 parent 626cd90 commit ce5b1ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/nl/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -60,7 +60,7 @@ var switches = [
var parser;

var help = exports.help = function() {
sys.puts(parser);
util.log(parser);
process.exit();
};

Expand Down
5 changes: 2 additions & 3 deletions scripts/jsmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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.