Skip to content

Commit

Permalink
Rewrite karma config in ES6
Browse files Browse the repository at this point in the history
  • Loading branch information
javivelasco committed Sep 21, 2015
1 parent e87523b commit 1ba0416
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 38 deletions.
38 changes: 0 additions & 38 deletions karma.conf.coffee

This file was deleted.

36 changes: 36 additions & 0 deletions karma.conf.js
@@ -0,0 +1,36 @@
require('webpack');

var pkg = require('./package.json');
var ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = function (config) {
config.set({
browsers: ['PhantomJS'],
singleRun: true,
frameworks: ['mocha'],
files: [
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
'./node_modules/babel-core/browser-polyfill.js',
'./node_modules/react/dist/react-with-addons.js',
'tests.webpack.js'
],
reporters: ['dots'],
preprocessors: {'tests.webpack.js': ['webpack']},
webpack: {
resolve: { extensions: ['', '.jsx', '.cjsx', '.coffee', '.js', '.json', '.styl'] },
module: {
loaders: [
{ test: /(\.js|\.jsx)$/, exclude: /(node_modules)/, loader: 'babel'},
{ test: /\.cjsx$/, loader: 'coffee-jsx-loader'},
{ test: /\.coffee$/, loader: 'coffee-jsx-loader'},
{ test: /\.styl$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&importLoaders=1&localIdentName=[hash:base64:5]!stylus-loader')}
]
},
watch: true,
plugins: [new ExtractTextPlugin(pkg.name + '.[name].css', {allChunks: false})]
},
webpackServer: {
noInfo: true
}
});
};

0 comments on commit 1ba0416

Please sign in to comment.