resolves #131 create output directory immediately (#167)

* resolves #131 create output directory immediately

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* fix error if no steps are passed

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* add exit message if steps not passed

Signed-off-by: tech4GT <varun.gupta1798@gmail.com>

* add test for creating output directory
This commit is contained in:
Varun Gupta
2018-02-07 03:12:22 +05:30
committed by Jeffrey Warren
parent c5dee8aef3
commit 32c5a29906
5 changed files with 45 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ module.exports = function ExportBin(dir = "./output/",ref,basic) {
dir = (dir[dir.length-1]=="/") ? dir : dir + "/";
if(ref.options.inBrowser) return false;
fs.access(dir, function(err){
if(err) fs.mkdir(dir, function() {});
if(err) console.error(err)
});
getDirectories(dir,function(dirs){
var num = 1;