diff --git a/.gitignore b/.gitignore index 8c5e250..41530c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ -.history +.DS_Store +.history/ +.vscode/ coverage/ +node_modules/ +npm-debug.log diff --git a/lib/History.md b/lib/History.md new file mode 100644 index 0000000..7e03827 --- /dev/null +++ b/lib/History.md @@ -0,0 +1,5 @@ +# Changelog for JAUL + +1.0.0 +===== +* Initial release. diff --git a/lib/io.js b/lib/io.js index fb3b114..b4a69a4 100644 --- a/lib/io.js +++ b/lib/io.js @@ -62,22 +62,19 @@ class IOUtils { if (fs.existsSync(path.resolve(target))) { return; } - var callback = function (p) { + var callback = function(p) { p = path.resolve(p); try { fs.mkdirSync(p); - } - catch (ex) { + } catch (ex) { if (ex.code === "ENOENT") { callback(path.dirname(p)); callback(p); - } - else { + } else { let stat; try { stat = fs.statSync(p); - } - catch (ex1) { + } catch (ex1) { ex1.friendlyMessage = `Can't create directory: ${p}`; throw ex1; } @@ -96,7 +93,7 @@ class IOUtils { * @returns A promise with a setTimeout for the specified milliseconds. */ static sleep(ms) { - return new Promise(function (resolve) { + return new Promise(function(resolve) { return setTimeout(resolve, ms); }); } diff --git a/package.json b/package.json index 9908c4a..9add073 100755 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ }, "devDependencies": { "@types/node": "^11.11.4", - "async_hooks": "^1.0.0", "chai": "^4.2.0", "coveralls": "^3.0.3", "express": "^4.16.4",