Skip to content

Commit

Permalink
Replace q-io with fs-extra.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored and tschaub committed Apr 16, 2020
1 parent 79c15dd commit 4b29a86
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 133 deletions.
7 changes: 3 additions & 4 deletions lib/git.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const cp = require('child_process');
const path = require('path');
const util = require('util');

const fse = require('fs-extra');
const Q = require('q');
const fs = require('q-io/fs');

let git = 'git';

Expand Down Expand Up @@ -88,11 +87,11 @@ exports.init = function init(cwd) {
* @return {Promise} A promise.
*/
exports.clone = function clone(repo, dir, branch, options) {
return fs.exists(dir).then(exists => {
return fse.pathExists(dir).then(exists => {
if (exists) {
return Q.resolve();
}
return fs.makeTree(path.dirname(path.resolve(dir))).then(() => {
return fse.ensureDir(path.dirname(path.resolve(dir))).then(() => {
const args = ['clone', repo, dir, '--branch', branch, '--single-branch'];
if (options.depth) {
args.push('--depth', options.depth);
Expand Down
128 changes: 0 additions & 128 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"fs-extra": "^8.1.0",
"graceful-fs": "^4.2.3",
"q": "^1.5.1",
"q-io": "^1.13.6",
"url-safe": "^2.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit 4b29a86

Please sign in to comment.