Skip to content

Commit

Permalink
Added mkdirp to express(1). Closes #795
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Sep 21, 2011
1 parent d8b20bd commit c2fc9a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions bin/express
Expand Up @@ -5,7 +5,8 @@
*/

var fs = require('fs')
, exec = require('child_process').exec;
, exec = require('child_process').exec
, mkdirp = require('mkdirp');

/**
* Framework version.
Expand Down Expand Up @@ -398,9 +399,9 @@ function prompt(msg, fn) {
*/

function mkdir(path, fn) {
exec('mkdir -p ' + path, function(err){
mkdirp(path, 0755, function(err){
if (err) throw err;
console.log(' \x1b[36mcreate\x1b[0m : ' + path);
console.log(' \033[36mcreate\033[0m : ' + path);
fn && fn();
});
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -12,7 +12,8 @@
"dependencies": {
"connect": ">= 1.5.2 < 2.0.0",
"mime": ">= 0.0.1",
"qs": ">= 0.3.1"
"qs": ">= 0.3.1",
"mkdirp": "0.0.7"
},
"devDependencies": {
"connect-form": "0.2.1",
Expand Down

0 comments on commit c2fc9a8

Please sign in to comment.