This is an alternative to PR jashkenas/docco#155 which supports Windows by replacing shell commands within the program.
On a side note; can cake install simply be replaced with npm link or npm install -g?
npm install -g
added initial support for windows - still need to fix copying
replaced mkdirp and wrench with fs.extra
replaced unix-based commands with node-based alternatives
Merge remote branch 'upstream/master' into windows
async seems to be an unnecessary dependency to me. Is it actually required to make Windows work?
removed async dependency
@keithamus I've removed the async dependency. I prefer using it for asynchronous activities while it also provides good functionality (parallel processing) and don't think dependencies are a bad thing... But I've removed it all the same.
Hopefully this can be included in the next minor release (fingers crossed will be soon).
improved readability of asset copying conditions
I appreciate the async functionality, but I think in the context of this PR I'm not sure it's relevant. Thanks for removing it.
As for the rest, it looks good to me, but I'm leaving this one to @jashkenas as he might have an opinion on the extra dependencies.
@jashkenas You'll also be happy to know that I actually reduced the LoC this time (albeit only by 1) 😄. In docco.litcoffee at least...
@keithamus Fair enough, the fs-extra package (which I only recently discovered) is a fantastic module that acts as a drop-in replacement for node's fs module, while providing it's own functionality and borrowing some from others. In this case, I'm using fs.mkdirs and fs.copy which reflect mkdirp and ncp respectively. Both of which are extremely popular fs-related modules (and rightly so).
I tried to keep the changes as simple as possible while supporting Windows and I hope @jashkenas can appreciate that. I understand why he's keen on keeping the code minimal and readable, and I believe this PR maintains that while adding support for more developers out there.
Merge remote branch 'origin/master' into windows
fixed bug where an error would be thrown when copying files
I've found a bug causing an error during some final testing and pushed a fix for it. This runs perfectly fine now and hopefully it can be merged into master now.
replaced file paths with path.joins for full compatibility
Just ran this on another version of Windows on my VM and found odd behaviour with file paths. It didn't like the slashes (though I thought node handled these), so I've replaced paths like:
path.join dir, 'docco.jst'
Final fix... honest 😉 It works great on different versions of Windows with different versions of node now.