From 4bfdd6c1f934eeb89ca04393e597c6fa30242b11 Mon Sep 17 00:00:00 2001 From: Yuri Petusko Date: Wed, 17 Feb 2016 10:41:09 +0000 Subject: [PATCH 1/2] fix: cloneWithProps is not used --- src/MediaSwitch.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/src/MediaSwitch.coffee b/src/MediaSwitch.coffee index a1e588b..d1f6040 100644 --- a/src/MediaSwitch.coffee +++ b/src/MediaSwitch.coffee @@ -1,5 +1,4 @@ React = require 'react' -{addons: {cloneWithProps}} = require 'react/addons' eq = require './eq' extend = require 'xtend' From 9f312824f3a5ac5d712a52a9f5f59ba054eeb504 Mon Sep 17 00:00:00 2001 From: Yuri Petusko Date: Wed, 17 Feb 2016 11:23:52 +0000 Subject: [PATCH 2/2] chore: Updating dependencies --- gulpfile.coffee | 3 --- package.json | 20 ++++++++++---------- standalone/react-mediaswitch.js | 12 +++++++----- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index e34a6be..6228f25 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -29,15 +29,12 @@ gulp.task 'build:browser', ['build:node'], -> gulp.src './lib/*.js' .pipe browserify standalone: 'mediaswitch' - transform: ['browserify-shim'] .pipe rename('react-mediaswitch.js') .pipe gulp.dest('./standalone/') gulp.task 'build:tests', -> gulp.src './test/**/*.?(lit)coffee' .pipe coffee().on('error', gutil.log) - .pipe browserify - transform: ['browserify-shim'] .pipe gulp.dest('./test/') # A server for the test page diff --git a/package.json b/package.json index 06bdf47..c0cc585 100644 --- a/package.json +++ b/package.json @@ -11,18 +11,16 @@ }, "devDependencies": { "coffee-script": "~1.7.1", - "browserify": "~3.33.0", - "browserify-shim": "~3.3.2", - "gulp": "~3.5.6", + "browserify": "~12.0.0", + "browserify-shim": "~3.8.12", + "gulp": "~3.8.5", "gulp-bump": "~0.1.6", "gulp-coffee": "~1.4.1", "gulp-util": "~2.2.14", - "gulp-browserify": "~0.5.0", + "gulp-browserify": "~0.5.1", "gulp-connect": "~1.0.9", - "gulp-rename": "~1.2.0" - }, - "peerDependencies": { - "react": "*" + "gulp-rename": "~1.2.0", + "react": "^0.14.2" }, "scripts": { "prepublish": "gulp build", @@ -46,8 +44,10 @@ "bugs": { "url": "https://github.com/matthewwithanm/react-mediaswitch/issues" }, + "browserify": { + "transform": ["browserify-shim"] + }, "browserify-shim": { - "react": "global:React", - "react/addons": "global:React" + "react": "global:React" } } diff --git a/standalone/react-mediaswitch.js b/standalone/react-mediaswitch.js index 46d4e5a..ca6d400 100644 --- a/standalone/react-mediaswitch.js +++ b/standalone/react-mediaswitch.js @@ -1,7 +1,8 @@ !function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.mediaswitch=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o