Skip to content

Instantly share code, notes, and snippets.

@raine
Created February 26, 2015 09:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save raine/ab56a90442ea1f61a97d to your computer and use it in GitHub Desktop.
Save raine/ab56a90442ea1f61a97d to your computer and use it in GitHub Desktop.
hack to enable generator in globally installed npm module http://sambal.org/2014/02/passing-options-node-shebang-line/
#!/bin/sh
":" //# comment; exec /usr/bin/env node --harmony "$0" "$@"
var generators = require('generator-supported');
if (generators) {
require('../lib');
} else {
console.log('ERROR: node >= v0.11.3 is required for generators');
process.exit(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment