Last active
August 29, 2015 14:22
-
-
Save anru/136348c55c5642cd0612 to your computer and use it in GitHub Desktop.
babelify
This file contains 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
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