isibner/stubbify — pull request #14 by LewisJEllis (2014-12-30 05:04:36+00:00)
Title: Refactor/overhaul to use Highland streams and clean some things up.

- Refactors both filename collection and file stubbification to use Highland streams
- Preserves trailing newlines in stubbified files (were previously dropped)
- Consistently names delimiter regex variables throughout (beginStub, endStub)
- Defaults the delimiter regexes top-down instead of bottom-up
- This reduces redundant checks and follows IoC style
- Keeps track of filenames that get stubbified
- Prints stubbified filenames with destination paths, with silent flag to disable
- Prefers closures to objects for encapsulation when objects are unnecessary
- Specifically Parser, since it no longer needs to inherit from Transform
- DRYs up parser tests
- Refactors stubbify tests to allow testing on multiple files
- Adds stubbify tests for nested stubs and for no stubs
- Moves everything but cli.js into /lib
- Updates README with usage and details

The refactor helped readability a lot, especially in the tests; despite various small additions, lines are -7 overall, much thanks to Highland.