Add "bin/cleancss" to the JSHint command and fix the warnings.
authorXhmikosR <xhmikosr@users.sourceforge.net>
Mon, 4 Nov 2013 09:51:56 +0000 (11:51 +0200)
committerXhmikosR <xhmikosr@users.sourceforge.net>
Tue, 5 Nov 2013 10:58:01 +0000 (12:58 +0200)
bin/cleancss
package.json

index e73ebd5..0db1805 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/env node
 
+/* jshint latedef: false */
+
 var util = require('util');
 var fs = require('fs');
 var path = require('path');
@@ -48,10 +50,10 @@ var options = {
   target: null
 };
 var cleanOptions = {};
-var fromStdin = !process.env['__DIRECT__'] && !process.stdin.isTTY;
+var fromStdin = !process.env.__DIRECT__ && !process.stdin.isTTY;
 
 // If no sensible data passed in just print help and exit
-if (!fromStdin && commands.args.length == 0) {
+if (!fromStdin && commands.args.length === 0) {
   commands.outputHelp();
   return 0;
 }
@@ -127,7 +129,7 @@ function output(minified) {
     fs.writeFileSync(options.target, minified, 'utf8');
   else
     process.stdout.write(minified);
-};
+}
 
 function outputFeedback(messages, isError) {
   var prefix = isError ? '\x1B[31mERROR\x1B[39m:' : 'WARNING:';
@@ -135,4 +137,4 @@ function outputFeedback(messages, isError) {
   messages.forEach(function(message) {
     console.error('%s %s', prefix, message);
   });
-};
+}
index cb121d2..577ce97 100644 (file)
@@ -29,7 +29,7 @@
   ],
   "scripts": {
     "bench": "node ./test/bench.js",
-    "check": "jshint .",
+    "check": "jshint ./bin/cleancss .",
     "prepublish": "jshint .",
     "test": "vows"
   },