node-red/node-red — pull request #139 by nrn (2014-01-16 06:41:09+00:00)
Title: Remove some sync calls from localfilesystem.js.

Node-red is an awesome application, thanks for open sourcing it! Saw some stuff I thought I might be able to help improve so I dove right in, I hope this is useful.

localfilesystem.js exposes a nice promises api, so I attempted to remove some synchronous calls and node style call backs to bring the internals more in line with the api. This removes a lot of promise creation/error handler boiler plate by embracing the default behavior of the when library. There were a lot of synchronous calls I didn't know how to tackle, but hopefully this is on the right track to removing them all.

Also included mkdirp to safely make whole paths of dirs at a time. And added an `npm test` command for easier testing without having to install mocha globally.