file-ensure
Simply ensure that a file exists, else create it: this becomes handy
when you provide skeleton file, like config_dev.yml.example
that should
be ignored in git but need to be available in your FS to run your
application.
Installation
As usual, this module is provided through NPM:
npm install file-ensure
Usage
The module's usage is straightforward:
ensure(filePath, options, [callback])
# or
ensure(filePath, [callback])
Simply require and use it for every file you want to make sure that exists in your filesystem:
var ensure = ;;
Simple as that :)
You can also create the file from another file:
;
Tests
This small library is tested through mocha, while automated tests run on travis.