Use module mkdirp instead of native unix command that doesn't work on Windows

pull/2/head
Louis Chatriot 12 years ago
parent 1dccdf0497
commit 8b7831acef
  1. 4
      lib/customUtils.js
  2. 5
      package.json

@ -1,7 +1,7 @@
var fs = require('fs')
, crypto = require('crypto')
, path = require('path')
, childProcess = require('child_process')
, mkdirp = require('mkdirp')
;
@ -13,7 +13,7 @@ function ensureDirectoryExists (dir, cb) {
var callback = cb || function () {}
;
childProcess.exec('mkdir -p ' + dir.replace(/ /g, '\\ '), function (err) { return callback(err); });
mkdirp(dir, function (err) { return callback(err); });
}

@ -1,6 +1,6 @@
{
"name": "nedb",
"version": "0.7.4",
"version": "0.7.5",
"author": {
"name": "tldr.io",
"email": "hello@tldr.io"
@ -22,7 +22,8 @@
"dependencies": {
"async": "~0.2.8",
"underscore": "~1.4.4",
"binary-search-tree": "0.2.3"
"binary-search-tree": "0.2.3",
"mkdirp": "~0.3.5"
},
"devDependencies": {
"chai": "1.0.x",

Loading…
Cancel
Save