From e93488de2c5c955405e9ea5bd509c7565b7612ef Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Wed, 1 Jun 2016 07:59:15 +0300 Subject: [PATCH] Update and clean up frontend dependencies --- karma.conf.js | 86 +++++++++++++++++++++++------------------------- package.json | 29 ++++++++-------- src/index.js | 3 +- src/polyfills.js | 2 ++ tests/index.js | 2 ++ 5 files changed, 61 insertions(+), 61 deletions(-) create mode 100644 src/polyfills.js diff --git a/karma.conf.js b/karma.conf.js index 6f5fa0a..b977660 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -2,73 +2,71 @@ // Generated on Sat Jun 13 2015 12:22:02 GMT+0300 (EEST) module.exports = function(config) { - config.set({ + config.set({ - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '', + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: '', - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - // - // NOTE: es5-shim был добавлен, так как phantomJS не может es5... - frameworks: ['mocha', 'sinon', 'chai', 'es5-shim'], + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['mocha', 'sinon', 'chai'], - // list of files / patterns to load in the browser - files: [ - 'tests/index.js' - ], + // list of files / patterns to load in the browser + files: [ + 'tests/index.js' + ], - // list of files to exclude - exclude: [ - ], + // list of files to exclude + exclude: [ + ], - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - 'tests/index.js': ['webpack', 'sourcemap'] - }, + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + 'tests/index.js': ['webpack', 'sourcemap'] + }, - webpack: require('./webpack.config.js'), + webpack: require('./webpack.config.js'), - webpackServer: { - noInfo: true //please don't spam the console when running in karma! - }, + webpackServer: { + noInfo: true //please don't spam the console when running in karma! + }, - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['nyan'], + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['nyan'], - // web server port - port: 9876, + // web server port + port: 9876, - // enable / disable colors in the output (reporters and logs) - colors: true, + // enable / disable colors in the output (reporters and logs) + colors: true, - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['PhantomJS'], + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: ['PhantomJS'], - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false - }); + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false + }); }; diff --git a/package.json b/package.json index d3c9e07..7901b1f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "repository": "git@bitbucket.org:ErickSkrauch/ely.by-account.git", "scripts": { "start": "rm -rf dist/ && webpack-dev-server --progress --colors", - "up": "npm i && cd ./webpack && npm i && cd ../scripts && npm i", + "up": "npm update && cd ./webpack && npm update && cd ../scripts && npm update", "test": "karma start ./karma.conf.js", "lint": "eslint ./src", "i18n": "cd ./scripts && ./node_modules/.bin/babel-node i18n-collect.js", @@ -18,45 +18,45 @@ "dependencies": { "babel-polyfill": "^6.3.14", "classnames": "^2.1.3", - "history": "^1.17.0", + "history": "^3.0.0", "intl": "^1.2.2", "intl-format-cache": "^2.0.4", "intl-messageformat": "^1.1.0", "promise.prototype.finally": "^1.0.1", "react": "^15.0.0", "react-dom": "^15.0.0", - "react-helmet": "^2.3.1", + "react-helmet": "^3.1.0", "react-intl": "^2.0.0", "react-motion": "^0.4.0", "react-redux": "^4.0.0", "react-router": "^2.0.0", "react-router-redux": "^3.0.0", "redux": "^3.0.4", - "redux-thunk": "^1.0.0", - "whatwg-fetch": "^0.11.0" + "redux-thunk": "^2.0.0", + "whatwg-fetch": "^1.0.0" }, "devDependencies": { "babel-core": "^6.0.0", - "babel-eslint": "^5.0.0-beta6", + "babel-eslint": "^6.0.0", "babel-loader": "^6.0.0", - "babel-plugin-react-intl": "~2.0.0", + "babel-plugin-react-intl": "^2.0.0", "babel-plugin-transform-runtime": "^6.3.13", - "babel-preset-airbnb": "^1.1.1", + "babel-preset-airbnb": "^2.0.0", "babel-preset-es2015": "^6.3.13", "babel-preset-react": "^6.3.13", "babel-preset-react-hmre": "^1.0.1", "babel-preset-stage-0": "^6.3.13", - "babel-runtime": "^5.6.15", + "babel-runtime": "^6.0.0", "bundle-loader": "^0.5.4", "chai": "^3.0.0", "chokidar": "^1.2.0", "css-loader": "^0.23.0", "cssnano": "^3.4.0", "enzyme": "^2.2.0", - "eslint": "^1.10.3", - "eslint-plugin-react": "^3.13.1", + "eslint": "^2.11.0", + "eslint-plugin-react": "^5.0.0", "exports-loader": "^0.6.3", - "extract-text-webpack-plugin": "^0.9.1", + "extract-text-webpack-plugin": "^1.0.0", "file-loader": "^0.8.5", "fontgen-loader": "^0.2.1", "html-loader": "^0.4.3", @@ -65,8 +65,7 @@ "json-loader": "^0.5.4", "karma": "*", "karma-chai": "*", - "karma-es5-shim": "*", - "karma-mocha": "^0.2.1", + "karma-mocha": "^1.0.0", "karma-nyan-reporter": "^0.2.3", "karma-phantomjs-launcher": "*", "karma-sinon": "^1.0.4", @@ -77,7 +76,7 @@ "mocha": "^2.2.5", "node-sass": "^3.4.2", "phantomjs-prebuilt": "^2.0.0", - "postcss-loader": "^0.8.0", + "postcss-loader": "^0.9.0", "postcss-url": "^5.1.1", "raw-loader": "^0.5.1", "react-addons-test-utils": "^15.0.2", diff --git a/src/index.js b/src/index.js index 06e079c..0be472a 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,4 @@ -import 'babel-polyfill'; -import 'promise.prototype.finally'; +import 'polyfills'; import React from 'react'; import ReactDOM from 'react-dom'; diff --git a/src/polyfills.js b/src/polyfills.js new file mode 100644 index 0000000..e4d74c1 --- /dev/null +++ b/src/polyfills.js @@ -0,0 +1,2 @@ +import 'babel-polyfill'; +import 'promise.prototype.finally'; diff --git a/tests/index.js b/tests/index.js index c0813c3..9661d82 100644 --- a/tests/index.js +++ b/tests/index.js @@ -1,3 +1,5 @@ +import 'polyfills'; + // require all modules ending in "_test" from the // current directory and all subdirectories var testsContext = require.context(".", true, /\.test\.jsx?$/);