Use util not sys
authorJan Alonzo <jmalonzo@taguchimail.com>
Tue, 29 Nov 2011 02:44:36 +0000 (13:44 +1100)
committerJan Alonzo <jmalonzo@taguchimail.com>
Tue, 29 Nov 2011 02:44:36 +0000 (13:44 +1100)
bin/cleancss
lib/clean.js

index e555412..5130fc6 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env node
 
-global.sys = require(/^v0\.[012]/.test(process.version) ? "sys" : "util");
+global.util = require("util");
 var argv = require('optimist').argv,
   cleanCss = require('../index'),
   fs = require('fs');
@@ -14,7 +14,7 @@ if (argv.o) options.target = argv.o;
 if (argv._) options.source = argv._[0];
 
 if (argv.h || argv.help) {
-  global.sys.print('Usage: cleancss -o <output-file> <input-file>\n');
+  global.util.print('Usage: cleancss -o <output-file> <input-file>\n');
   process.exit(0);
 }
 
index 0bc0dfe..95cc758 100644 (file)
@@ -1,4 +1,4 @@
-var sys = require('sys');
+var util = require('util');
 
 var CleanCSS = {
   colors: {
@@ -22,7 +22,7 @@ var CleanCSS = {
         var end = new Date().getTime();
       
         if (end > start)
-          sys.print(pattern + ' -> ' + (end - start) + ' milliseconds\n');
+          util.print(pattern + ' -> ' + (end - start) + ' milliseconds\n');
       }
     };
     
@@ -125,4 +125,4 @@ var CleanCSS = {
   }
 };
 
-module.exports = CleanCSS;
\ No newline at end of file
+module.exports = CleanCSS;