Skip to content

Commit

Permalink
YUITest Build
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Aug 17, 2012
1 parent d598be3 commit 2e704ed
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
11 changes: 9 additions & 2 deletions javascript/build/yuitest/npm/cli.js
Expand Up @@ -5,6 +5,7 @@
*/
var fs = require("fs"),
path = require("path"),
exists = fs.existsSync || path.existsSync,
vm = null,
YUITest = require("yuitest"),
stdout = process.stdout,
Expand Down Expand Up @@ -54,8 +55,14 @@ YUITest.CLI = {
}
},

isDirectory: function(name){
return fs.statSync(name).isDirectory();
isDirectory: function(name) {
if (exists(name)) {
var stat = fs.statSync(name);
return stat.isDirectory();
} else {
this.warn('File Not Found: ' + name);
this.quit(1);
}
},

getFiles: function(dir){
Expand Down
11 changes: 9 additions & 2 deletions javascript/build/yuitest/yuitest-node-cli-debug.js
Expand Up @@ -4,6 +4,7 @@
*/
var fs = require("fs"),
path = require("path"),
exists = fs.existsSync || path.existsSync,
vm = null,
YUITest = require("yuitest"),
stdout = process.stdout,
Expand Down Expand Up @@ -53,8 +54,14 @@ YUITest.CLI = {
}
},

isDirectory: function(name){
return fs.statSync(name).isDirectory();
isDirectory: function(name) {
if (exists(name)) {
var stat = fs.statSync(name);
return stat.isDirectory();
} else {
this.warn('File Not Found: ' + name);
this.quit(1);
}
},

getFiles: function(dir){
Expand Down
2 changes: 1 addition & 1 deletion javascript/build/yuitest/yuitest-node-cli-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions javascript/build/yuitest/yuitest-node-cli.js
Expand Up @@ -4,6 +4,7 @@
*/
var fs = require("fs"),
path = require("path"),
exists = fs.existsSync || path.existsSync,
vm = null,
YUITest = require("yuitest"),
stdout = process.stdout,
Expand Down Expand Up @@ -53,8 +54,14 @@ YUITest.CLI = {
}
},

isDirectory: function(name){
return fs.statSync(name).isDirectory();
isDirectory: function(name) {
if (exists(name)) {
var stat = fs.statSync(name);
return stat.isDirectory();
} else {
this.warn('File Not Found: ' + name);
this.quit(1);
}
},

getFiles: function(dir){
Expand Down

0 comments on commit 2e704ed

Please sign in to comment.