npm install --save-dev babel-core \
babel-loader \
babel-preset-es2015 \
eslint \
eslint-config-airbnb \
imports-loader \
jasmine \
karma \
karma-eslint \
karma-jasmine \
karma-phantomjs-launcher \
karma-webpack \
phantomjs \
sinon \
webpack
{ "extends": "airbnb/base"
, "rules":
{ "func-names": 0
, "no-undef": 0
}
}
module.exports = function(config) {
config.set({
frameworks: [ 'jasmine' ],
files: [
'test/**/*_test*'
],
preprocessors: {
'test/**/*_test*': 'webpack'
},
webpack: {
module: {
loaders: [
{ test: /js$/
, loader: 'babel'
, exclude: /node_modules/
, query: { presets: ['es2015'] }
}
]
}
},
webpackMiddleware: {
noInfo: true
}
});
};
module.exports =
{ entry: './src/index.js'
, module:
{ loaders:
[ { test: 'js$'
, exclude: /node_modules/
, loader: 'babel'
, query: { presets: ['es2015'] }
}
]
}
};