1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-10 07:47:07 +01:00

Multiple things.

1. Load themes directly in FCMD instead of only through FluentLib.
2. Add support for silent mode (`-s` or `--silent`).
3. Silently create output folder if not present (mkdirp).
This commit is contained in:
devlinjd
2015-10-26 08:01:01 -04:00
parent 06294a90b5
commit 4a98e0bb25
4 changed files with 64 additions and 15 deletions

18
src/utils/file-exists.js Normal file
View File

@ -0,0 +1,18 @@
/**
File-exists checker for Node.js.
@license Copyright (c) 2015 | James M. Devlin
*/
var FS = require('fs');
// Yup, this is now the recommended way to check for file existence on Node.
// fs.exists is deprecated and the recommended fs.statSync/lstatSync throws
// exceptions on non-existent paths :)
module.exports = function (path) {
try {
FS.statSync( path );
return true;
} catch( err ) {
return !(err && err.code === 'ENOENT');
}
};