Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cloneWithProps is not used #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
1 change: 0 additions & 1 deletion src/MediaSwitch.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
React = require 'react'
{addons: {cloneWithProps}} = require 'react/addons'
eq = require './eq'
extend = require 'xtend'

Expand Down
12 changes: 7 additions & 5 deletions standalone/react-mediaswitch.js
Original file line number Diff line number Diff line change
@@ -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<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
(function (global){
var MediaCase, PropTypes, React, div;

React = (window.React);
React = (typeof window !== "undefined" ? window['React'] : typeof global !== "undefined" ? global['React'] : null);

PropTypes = React.PropTypes;

Expand All @@ -26,13 +27,13 @@ MediaCase = React.createClass({

module.exports = MediaCase;

}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],2:[function(_dereq_,module,exports){
var MediaSwitch, PropTypes, React, cloneWithProps, div, eq, extend,
(function (global){
var MediaSwitch, PropTypes, React, div, eq, extend,
__hasProp = {}.hasOwnProperty;

React = (window.React);

cloneWithProps = (window.React).addons.cloneWithProps;
React = (typeof window !== "undefined" ? window['React'] : typeof global !== "undefined" ? global['React'] : null);

eq = _dereq_('./eq');

Expand Down Expand Up @@ -196,6 +197,7 @@ MediaSwitch = React.createClass({

module.exports = MediaSwitch;

}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./eq":3,"xtend":6}],3:[function(_dereq_,module,exports){
var kvPairsAreEqual,
__hasProp = {}.hasOwnProperty;
Expand Down