ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit e6e3a97e90288a4b0049a2c65474d06cef65c26c
parent 7ba3c9b96e4fb30d813f9650ca663171edb7e0c6
Author: Konstantin Tarkus <hello@tarkus.me>
Date:   Tue,  2 Jun 2015 21:56:34 +0300

Update npm modules; replace autoprefixer-loader with postcss

Ref #110, #126, #129, #130

Diffstat:
Mpackage.json | 42++++++++++++++++++++++--------------------
Msrc/api/query.js | 4++--
Msrc/decorators/withContext.js | 2+-
Msrc/decorators/withStyles.js | 2+-
Msrc/decorators/withViewport.js | 2+-
Mwebpack.config.js | 15+++++++++------
6 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/package.json b/package.json @@ -10,49 +10,51 @@ "npm": ">= 2.1" }, "dependencies": { - "babel": "5.4.3", - "classnames": "2.1.1", + "babel": "5.4.7", + "classnames": "2.1.2", "eventemitter3": "1.1.0", "express": "4.12.4", "fastclick": "1.0.6", "flux": "2.0.3", "front-matter": "1.0.0", - "jade": "1.9.2", - "lodash": "3.8.0", + "jade": "1.10.0", + "lodash": "3.9.3", "normalize.css": "3.0.3", "react": "0.13.3", - "source-map-support": "0.2.10", + "source-map-support": "0.3.1", "superagent": "1.2.0" }, "devDependencies": { - "autoprefixer-loader": "^1.2.0", - "babel-core": "^5.4.3", - "babel-eslint": "^3.1.5", - "babel-loader": "^5.1.2", - "browser-sync": "^2.7.1", - "css-loader": "^0.12.1", - "del": "^1.1.1", + "autoprefixer-core": "^5.2.0", + "babel-core": "^5.4.7", + "babel-eslint": "^3.1.10", + "babel-loader": "^5.1.3", + "browser-sync": "^2.7.6", + "css-loader": "^0.14.4", + "del": "^1.2.0", "eslint": "^0.21.2", "eslint-loader": "^0.11.2", - "eslint-plugin-react": "^2.3.0", + "eslint-plugin-react": "^2.4.0", "git-push": "^0.1.1", - "gulp": "^3.8.11", + "gulp": "^3.9.0", "gulp-changed": "^1.2.1", "gulp-if": "^1.2.5", "gulp-load-plugins": "^0.10.0", "gulp-rename": "^1.2.2", "gulp-size": "^1.2.1", - "gulp-util": "^3.0.4", + "gulp-util": "^3.0.5", "jest-cli": "^0.4.5", - "less": "^2.5.0", + "less": "^2.5.1", "less-loader": "^2.2.0", "minimist": "^1.1.1", - "protractor": "^2.0.0", + "postcss": "^4.1.11", + "postcss-loader": "^0.4.4", + "protractor": "^2.1.0", "psi": "^1.0.6", "run-sequence": "^1.1.0", - "style-loader": "^0.12.2", - "url-loader": "^0.5.5", - "webpack": "^1.9.7" + "style-loader": "^0.12.3", + "url-loader": "^0.5.6", + "webpack": "^1.9.10" }, "jest": { "rootDir": "./src", diff --git a/src/api/query.js b/src/api/query.js @@ -1,9 +1,9 @@ /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ -import express from 'express'; +import { Router } from 'express'; import db from '../core/Database'; -const router = new express.Router(); +const router = new Router(); router.get('/', async (req, res, next) => { try { diff --git a/src/decorators/withContext.js b/src/decorators/withContext.js @@ -4,7 +4,7 @@ import React, { PropTypes } from 'react'; // eslint-disable-line no-unused-vars import emptyFunction from '../../node_modules/react/lib/emptyFunction'; function withContext(ComposedComponent) { - return class WithContext { + return class WithContext { // eslint-disable-line no-undef static propTypes = { context: PropTypes.shape({ diff --git a/src/decorators/withStyles.js b/src/decorators/withStyles.js @@ -7,7 +7,7 @@ import { canUseDOM } from '../../node_modules/react/lib/ExecutionEnvironment'; let count = 0; function withStyles(styles) { - return (ComposedComponent) => class WithStyles { + return (ComposedComponent) => class WithStyles { // eslint-disable-line no-undef static contextTypes = { onInsertCss: PropTypes.func diff --git a/src/decorators/withViewport.js b/src/decorators/withViewport.js @@ -16,7 +16,7 @@ function handleWindowResize() { } function withViewport(ComposedComponent) { - return class WithViewport extends Component { + return class WithViewport extends Component { // eslint-disable-line no-undef constructor() { super(); diff --git a/webpack.config.js b/webpack.config.js @@ -10,12 +10,13 @@ var _ = require('lodash'); var webpack = require('webpack'); +var autoprefixer = require('autoprefixer-core'); var argv = require('minimist')(process.argv.slice(2)); var DEBUG = !argv.release; var STYLE_LOADER = 'style-loader/useable'; var CSS_LOADER = DEBUG ? 'css-loader' : 'css-loader?minimize'; -var AUTOPREFIXER_LOADER = 'autoprefixer-loader?{browsers:' + JSON.stringify([ +var AUTOPREFIXER_BROWSERS = [ 'Android 2.3', 'Android >= 4', 'Chrome >= 20', @@ -23,7 +24,8 @@ var AUTOPREFIXER_LOADER = 'autoprefixer-loader?{browsers:' + JSON.stringify([ 'Explorer >= 8', 'iOS >= 6', 'Opera >= 12', - 'Safari >= 6']) + '}'; + 'Safari >= 6' +]; var GLOBALS = { 'process.env.NODE_ENV': DEBUG ? '"development"' : '"production"', '__DEV__': DEBUG @@ -69,12 +71,11 @@ var config = { loaders: [ { test: /\.css$/, - loader: STYLE_LOADER + '!' + CSS_LOADER + '!' + AUTOPREFIXER_LOADER + loader: STYLE_LOADER + '!' + CSS_LOADER + '!postcss-loader' }, { test: /\.less$/, - loader: STYLE_LOADER + '!' + CSS_LOADER + '!' + AUTOPREFIXER_LOADER + - '!less-loader' + loader: STYLE_LOADER + '!' + CSS_LOADER + '!postcss-loader!less-loader' }, { test: /\.gif/, @@ -98,7 +99,9 @@ var config = { loader: 'babel-loader' } ] - } + }, + + postcss: [autoprefixer(AUTOPREFIXER_BROWSERS)] }; //