@ -5,7 +5,14 @@ var async = require('async');
var fs = require('fs');
const util = require('util');
var mkdirp = require('mkdirp');
var mkdirpCallback = util.callbackify(mkdirp);
var mkdirpCallback;
if (mkdirp.hasOwnProperty('native')) {
mkdirpCallback = util.callbackify(mkdirp);
} else {
mkdirpCallback = mkdirp;
mkdirp = util.promisify(mkdirp);
}
var rimraf = require('rimraf');
var file = require('../file');
@ -2,11 +2,12 @@
const path = require('path');
const fs = require('fs');
const mkdirp = require('mkdirp');
let mkdirp = require('mkdirp');
mkdirp = mkdirp.hasOwnProperty('native') ? mkdirp : util.promisify(mkdirp);
const rimraf = require('rimraf');
const _ = require('lodash');
const rimrafAsync = util.promisify(rimraf);
const writeFileAsync = util.promisify(fs.writeFile);
const readFileAsync = util.promisify(fs.readFile);
const readdirAsync = util.promisify(fs.readdir);
@ -1,11 +1,11 @@
'use strict';
const winston = require('winston');
const fsReadFile = util.promisify(fs.readFile);
const fsWriteFile = util.promisify(fs.writeFile);