Skip to content

Instantly share code, notes, and snippets.

@anru
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anru/136348c55c5642cd0612 to your computer and use it in GitHub Desktop.
Save anru/136348c55c5642cd0612 to your computer and use it in GitHub Desktop.
babelify
var blacklist = [
'es6.arrowFunctions', // supported
'es6.blockScoping', // supported
'es6.constants', // supported
'es6.forOf', // supported
//'es6.modules', // supported
'regenerator'
];
try {
eval('a = (x) => { x + 1}');
} catch (e) {
console.warn('node running without --harmony flag');
blacklist = [
'es6.constants'
];
}
require('babel/register')({
blacklist: blacklist
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment