Skip to content

Commit

Permalink
Expose react-art/{Circle,Rectange/Wedge} on npm (#11343)
Browse files Browse the repository at this point in the history
* Include ART shapes into npm package

* Fix the fixture

* Prettier oops
  • Loading branch information
gaearon authored Oct 23, 2017
1 parent 0ebcbd4 commit f6c60dc
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 56 deletions.
2 changes: 1 addition & 1 deletion fixtures/art/VectorWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict';

var Circle = require('react-art/lib/Circle.art');
var Circle = require('react-art/Circle');
var React = require('react');
var ReactART = require('react-art');
var Group = ReactART.Group;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
'use strict';

var _extends =
Object.assign ||
function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};

/**
* Copyright (c) 2013-present, Facebook, Inc.
*
Expand All @@ -33,9 +17,12 @@ var _extends =
*
*/

'use strict';

var assign = require('object-assign');
var PropTypes = require('prop-types');
var React = require('react');
var ReactART = require('..');
var ReactART = require('react-art');

var createReactClass = require('create-react-class');

Expand All @@ -61,7 +48,7 @@ var Circle = createReactClass({
.arc(0, radius * 2, radius)
.arc(0, radius * -2, radius)
.close();
return React.createElement(Shape, _extends({}, this.props, {d: path}));
return React.createElement(Shape, assign({}, this.props, {d: path}));
},
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
'use strict';

var _extends =
Object.assign ||
function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};

/**
* Copyright (c) 2013-present, Facebook, Inc.
*
Expand All @@ -40,9 +24,12 @@ var _extends =
*
*/

'use strict';

var assign = require('object-assign');
var PropTypes = require('prop-types');
var React = require('react');
var ReactART = require('..');
var ReactART = require('react-art');

var createReactClass = require('create-react-class');

Expand Down Expand Up @@ -146,7 +133,7 @@ var Rectangle = createReactClass({
}
path.line(0, -height + (bl + tl));

return React.createElement(Shape, _extends({}, this.props, {d: path}));
return React.createElement(Shape, assign({}, this.props, {d: path}));
},
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
'use strict';

var _extends =
Object.assign ||
function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};

/**
* Copyright (c) 2013-present, Facebook, Inc.
*
Expand All @@ -36,9 +20,12 @@ var _extends =
*
*/

'use strict';

var assign = require('object-assign');
var PropTypes = require('prop-types');
var React = require('react');
var ReactART = require('..');
var ReactART = require('react-art');

var createReactClass = require('create-react-class');

Expand Down Expand Up @@ -193,7 +180,7 @@ var Wedge = createReactClass({
path = this._createArcPath(startAngle, endAngle, or, ir);
}

return React.createElement(Shape, _extends({}, this.props, {d: path}));
return React.createElement(Shape, assign({}, this.props, {d: path}));
},
});

Expand Down
5 changes: 4 additions & 1 deletion packages/react-art/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
"README.md",
"index.js",
"cjs/",
"umd/"
"umd/",
"Circle.js",
"Rectangle.js",
"Wedge.js"
],
"browserify": {
"transform": [
Expand Down

0 comments on commit f6c60dc

Please sign in to comment.