Skip to content

Commit

Permalink
Remove dependence on fs-extra.
Browse files Browse the repository at this point in the history
  • Loading branch information
cassierecher committed Sep 30, 2016
1 parent 3fc0cd0 commit 632c2bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/jsdoc/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
var fs = require('fs');
var path = require('path');
var stream = require('stream');
var fse = require('fs-extra');
var mkdirp = require('mkdirp');

var ls = exports.ls = function(dir, recurse, _allFiles, _path) {
var file;
Expand Down Expand Up @@ -91,7 +91,7 @@ exports.mkPath = function(_path) {
_path = _path.join('');
}

fse.mkdirsSync(_path);
mkdirp.sync(_path);
};

// adapted from http://procbits.com/2011/11/15/synchronous-file-copy-in-node-js
Expand All @@ -106,7 +106,7 @@ exports.copyFileSync = function(inFile, outDir, fileName) {
var outFile = path.join( outDir, fileName || path.basename(inFile) );
var pos = 0;

fse.mkdirsSync(outDir);
mkdirp.sync(outDir);
read = fs.openSync(inFile, 'r');
write = fs.openSync(outFile, 'w');

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
"catharsis": "~0.8.8",
"escape-string-regexp": "~1.0.5",
"espree": "~3.1.7",
"fs-extra": "~0.30.0",
"js2xmlparser": "~1.0.0",
"klaw": "~1.3.0",
"marked": "~0.3.6",
"mkdirp": "~0.5.1",
"requizzle": "~0.2.1",
"strip-json-comments": "~2.0.1",
"taffydb": "2.6.2",
Expand Down
4 changes: 2 additions & 2 deletions test/spec-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var fs = require('jsdoc/fs');
var path = require('jsdoc/path');
var runtime = require('jsdoc/util/runtime');
var fse = require('fs-extra');
var klaw = require('klaw');

var specs = [];
var finalSpecs = [];
Expand Down Expand Up @@ -81,7 +81,7 @@ exports.load = function(loadpath, matcher, clear, callback) {
}

var wannaBeSpecs = [];
fse.walk(loadpath)
klaw(loadpath)
.on('data', function(spec) {
wannaBeSpecs.push(spec.path);
})
Expand Down

0 comments on commit 632c2bb

Please sign in to comment.