Created
January 8, 2014 22:38
-
-
Save spollack/8325810 to your computer and use it in GitHub Desktop.
A thunk to load a single streamline source file (passed as a command line parameter) from vanilla node. Useful for one-offs. A similar approach can be taken to run mocha tests that include streamline code. The use of the optimist package here is pure sugar, and could be skipped if desired. In a typical full app, the main file would do the stream…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('streamline').register({ | |
fibers: true, | |
cache: true, | |
verbose: true | |
}); | |
var argv = require('optimist') | |
.usage('Usage: $0 -r streamlineFilePath') | |
.demand(['r']) | |
.argv; | |
require(argv.r); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment