From 65f8558508796cf785c7f52a2aaa8a12a963a861 Mon Sep 17 00:00:00 2001 From: Cameron J Roe Date: Sun, 8 Nov 2015 10:29:04 -0500 Subject: [PATCH] remove webpack --- karma.conf.js | 33 +++-------------------------- package.json | 12 +++-------- test/tests.webpack.js | 2 -- webpack.config.js | 49 ------------------------------------------- 4 files changed, 6 insertions(+), 90 deletions(-) delete mode 100644 test/tests.webpack.js delete mode 100644 webpack.config.js diff --git a/karma.conf.js b/karma.conf.js index 67fe729..c7e45c8 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -9,42 +9,15 @@ module.exports = function(config) { frameworks: ['mocha', 'chai', 'sinon'], files: [ + 'src/**/*.jsx', 'test/*.spec.js' ], preprocessors: { - 'test/*.spec.js': ['webpack'] + 'src/**/*.jsx': ['babel'], + 'test/*.spec.js': ['babel'] }, - webpack: { - cache: true, - module: { - loaders: [ - { test: /\.(js|jsx)$/, loader: 'babel' } - ] - }, - resolve: { - extensions: ['', '.js', '.jsx'], - alias: { - 'styles': path.join(process.cwd(), './src/styles/'), - 'components': path.join(process.cwd(), './src/components/') - } - } - - }, - - webpackServer: { - noInfo: true, - stats: { - colors: true - } - }, - - // coverageReporter: { - // type : 'html', - // dir : 'coverage/' - // }, - reporters: ['progress'], // 'coverage' port: 9876, diff --git a/package.json b/package.json index d955290..c28faef 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,7 @@ "watch": "gulp watch", "build": "gulp dist", "test": "karma start", - "prepublish": "npm run build", - "dev": "webpack-dev-server --progress --colors --hot --inline --no-info" + "prepublish": "npm run build" }, "author": "Cameron J Roe (http://cameronjroe.com/)", "license": "MIT", @@ -27,7 +26,6 @@ "babelify": "^7.2.0", "browserify": "^12.0.1", "chai": "^3.4.0", - "css-loader": "^0.22.0", "gulp": "^3.9.0", "gulp-babel": "^6.0.0", "gulp-concat": "^2.6.0", @@ -43,23 +41,19 @@ "isparta": "^3.5.1", "istanbul-instrumenter-loader": "^0.1.3", "jshint-stylish": "^2.0.1", - "jsxhint-loader": "^0.2.0", "karma": "^0.13.15", + "karma-babel-preprocessor": "^6.0.1", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^0.2.1", "karma-coverage": "^0.5.3", "karma-mocha": "^0.2.0", "karma-sinon": "^1.0.4", "karma-sourcemap-loader": "^0.3.6", - "karma-webpack": "^1.7.0", "mocha": "^2.3.3", "node-bourbon": "^4.2.3", "node-sass": "^3.4.1", - "sass-loader": "^3.1.1", "sinon": "^1.17.2", - "style-loader": "^0.13.0", "through2": "^2.0.0", - "vinyl-source-stream": "^1.1.0", - "webpack": "^1.12.2" + "vinyl-source-stream": "^1.1.0" } } diff --git a/test/tests.webpack.js b/test/tests.webpack.js deleted file mode 100644 index f2a9bb9..0000000 --- a/test/tests.webpack.js +++ /dev/null @@ -1,2 +0,0 @@ -var context = require.context('./src', true, /.spec\.js$/); //make sure you have your directory and regex test set correctly! -context.keys().forEach(context); \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 34ff822..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,49 +0,0 @@ -var webpack = require('webpack'); - -module.exports = { - - entry: [ - './src/StarRating.jsx' - ], - output: { - path: 'dist', - filename: 'react-star-rating.js' - }, - cache: true, - debug: true, - devtool: false, - stats: { - colors: true, - reasons: true - }, - resolve: { - extensions: ['', '.js', '.jsx'], - alias: { - 'styles': __dirname + '/src/styles', - 'mixins': __dirname + '/src/mixins', - 'components': __dirname + '/src/components/' - } - }, - module: { - // preLoaders: [{ - // test: /\.(js|jsx)$/, - // exclude: /node_modules/, - // loader: 'jsxhint' - // }], - loaders: [ - { - test: /\.(js|jsx)$/, - exclude: /node_modules/, - loader: 'babel-loader' - }, - { test: /\.css$/, loader: 'style-loader!css-loader' }, - { test: /\.(png|jpg|woff|woff2)$/, loader: 'url-loader?limit=8192'} - ] - }, - - plugins: [ - new webpack.HotModuleReplacementPlugin(), - new webpack.NoErrorsPlugin() - ] - -}; \ No newline at end of file