Preprocessor to compile tomorrow's JavaScript syntax to the language of today using esnext.
The easiest way is to keep karma-esnext-preprocessor
as a devDependency in your package.json
.
{
"devDependencies": {
"karma": "~0.12",
"karma-esnext-preprocessor": "~0.1"
}
}
You can easily add it by doing:
npm install karma-esnext-preprocessor --save-dev
Following code shows the default configuration...
// karma.conf.js
module.exports = function(config) {
config.set({
preprocessors: {
'**/*.js': ['esnext']
},
esnextPreprocessor: {
options: {
arrayComprehensions: false
}
}
});
};
Options are passed through to esnext.
For more information on Karma see the homepage.