Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-fela

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fela - npm Package Compare versions

Comparing version 2.1.0 to 3.0.0

8

Changelog.md
# Changelog
## 3.0
### 3.0.0
#### API Changes
* added `passThroughProps` parameter to specify `props` that get passed to the underlying component
* no more automatically pass all `props` to the underlying component
## 2.0
### 2.1.0

@@ -6,0 +12,0 @@ * introducing `createComponent` to presentational components from Fela rules

@@ -65,2 +65,14 @@ (function (global, factory) {

babelHelpers.objectWithoutProperties = function (obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
babelHelpers.possibleConstructorReturn = function (self, call) {

@@ -154,8 +166,23 @@ if (!self) {

var type = arguments.length <= 1 || arguments[1] === undefined ? 'div' : arguments[1];
var passThroughProps = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
var component = function component(props, _ref) {
var renderer = _ref.renderer;
return React.createElement(type, babelHelpers.extends({}, props, {
className: renderer.renderRule(rule, props)
}), props.children || null);
// extract children as a special prop
var children = props.children;
var felaProps = babelHelpers.objectWithoutProperties(props, ['children']);
// filter props to extract props to pass through
var componentProps = Object.keys(passThroughProps).reduce(function (output, prop) {
output[prop] = felaProps[prop];
if (!passThroughProps[prop]) {
delete felaProps[prop];
}
return output;
}, {});
componentProps.className = renderer.renderRule(rule, felaProps);
return React.createElement(type, componentProps, children);
};

@@ -162,0 +189,0 @@

2

dist/react-fela.min.js

@@ -1,1 +0,1 @@

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react"),require("fela")):"function"==typeof define&&define.amd?define(["react","fela"],r):e.ReactFela=r(e.React,e.Fela)}(this,function(e,r){"use strict";function t(r){return function(t){var n,s;return s=n=function(e){function n(){return i.classCallCheck(this,n),i.possibleConstructorReturn(this,Object.getPrototypeOf(n).apply(this,arguments))}return i.inherits(n,e),i.createClass(n,[{key:"render",value:function(){var e=r(this.props)(this.context.renderer);return o.createElement(t,i["extends"]({},this.props,{styles:e}))}}]),n}(e.Component),n.displayName=t.displayName||t.name||"Component",n.contextTypes=i["extends"]({},t.contextTypes,{renderer:u}),s}}function n(r){var t=arguments.length<=1||void 0===arguments[1]?"div":arguments[1],n=function(n,o){var s=o.renderer;return e.createElement(t,i["extends"]({},n,{className:s.renderRule(r,n)}),n.children||null)};return n.contextTypes={renderer:u},n}var o="default"in e?e["default"]:e,i={};i.classCallCheck=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},i.createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),i["extends"]=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.inherits=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)},i.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r};var s=e.PropTypes.shape({renderFont:e.PropTypes.func.isRequired,renderStatic:e.PropTypes.func.isRequired,renderRule:e.PropTypes.func.isRequired,renderKeyframe:e.PropTypes.func.isRequired}),u=s.isRequired,c=function(e){function t(){return i.classCallCheck(this,t),i.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return i.inherits(t,e),i.createClass(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.mountNode,n=e.renderer;t&&r.render(n,t)}},{key:"getChildContext",value:function(){return{renderer:this.props.renderer}}},{key:"render",value:function(){return this.props.children}}]),t}(e.Component);c.propTypes={renderer:u},c.childContextTypes={renderer:u};var a={Provider:c,connect:t,createComponent:n};return a});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react"),require("fela")):"function"==typeof define&&define.amd?define(["react","fela"],r):e.ReactFela=r(e.React,e.Fela)}(this,function(e,r){"use strict";function t(r){return function(t){var n,s;return s=n=function(e){function n(){return i.classCallCheck(this,n),i.possibleConstructorReturn(this,Object.getPrototypeOf(n).apply(this,arguments))}return i.inherits(n,e),i.createClass(n,[{key:"render",value:function(){var e=r(this.props)(this.context.renderer);return o.createElement(t,i["extends"]({},this.props,{styles:e}))}}]),n}(e.Component),n.displayName=t.displayName||t.name||"Component",n.contextTypes=i["extends"]({},t.contextTypes,{renderer:u}),s}}function n(r){var t=arguments.length<=1||void 0===arguments[1]?"div":arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],o=function(o,s){var u=s.renderer,c=o.children,a=i.objectWithoutProperties(o,["children"]),p=Object.keys(n).reduce(function(e,r){return e[r]=a[r],n[r]||delete a[r],e},{});return p.className=u.renderRule(r,a),e.createElement(t,p,c)};return o.contextTypes={renderer:u},o}var o="default"in e?e["default"]:e,i={};i.classCallCheck=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},i.createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),i["extends"]=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.inherits=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)},i.objectWithoutProperties=function(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},i.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r};var s=e.PropTypes.shape({renderFont:e.PropTypes.func.isRequired,renderStatic:e.PropTypes.func.isRequired,renderRule:e.PropTypes.func.isRequired,renderKeyframe:e.PropTypes.func.isRequired}),u=s.isRequired,c=function(e){function t(){return i.classCallCheck(this,t),i.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return i.inherits(t,e),i.createClass(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.mountNode,n=e.renderer;t&&r.render(n,t)}},{key:"getChildContext",value:function(){return{renderer:this.props.renderer}}},{key:"render",value:function(){return this.props.children}}]),t}(e.Component);c.propTypes={renderer:u},c.childContextTypes={renderer:u};var a={Provider:c,connect:t,createComponent:n};return a});

@@ -6,5 +6,2 @@ '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; };
exports.default = createComponent;

@@ -20,10 +17,29 @@

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function createComponent(rule) {
var type = arguments.length <= 1 || arguments[1] === undefined ? 'div' : arguments[1];
var passThroughProps = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
var component = function component(props, _ref) {
var renderer = _ref.renderer;
return (0, _react.createElement)(type, _extends({}, props, {
className: renderer.renderRule(rule, props)
}), props.children || null);
// extract children as a special prop
var children = props.children;
var felaProps = _objectWithoutProperties(props, ['children']);
// filter props to extract props to pass through
var componentProps = Object.keys(passThroughProps).reduce(function (output, prop) {
output[prop] = felaProps[prop];
if (!passThroughProps[prop]) {
delete felaProps[prop];
}
return output;
}, {});
componentProps.className = renderer.renderRule(rule, felaProps);
return (0, _react.createElement)(type, componentProps, children);
};

@@ -30,0 +46,0 @@

{
"name": "react-fela",
"version": "2.1.0",
"version": "3.0.0",
"description": "React bindings for Fela",

@@ -33,3 +33,3 @@ "repository": "https://github.com/rofrischmann/react-fela/",

"react": "^15.1.0",
"fela": "^1.0.0-beta.2"
"fela": "^1.2.0"
},

@@ -43,4 +43,2 @@ "devDependencies": {

"babel-plugin-transform-class-properties": "^6.9.1",
"babel-plugin-transform-dev-warning": "^0.1.0",
"babel-plugin-transform-node-env-inline": "^6.8.0",
"babel-preset-es2015": "^6.6.0",

@@ -52,3 +50,2 @@ "babel-preset-es2015-rollup": "^1.1.1",

"codeclimate-test-reporter": "^0.3.1",
"concurrently": "^2.1.0",
"cross-env": "^1.0.8",

@@ -69,11 +66,4 @@ "esformatter": "^0.9.0",

"eslint-config-rackt": "^1.1.1",
"eslint-plugin-react": "^5.1.1",
"eslint-plugin-react": "^6.2.2",
"estraverse-fb": "^1.3.1",
"express": "^4.13.4",
"express-http-proxy": "^0.6.0",
"fela": "^1.0.0-beta.2",
"fela-plugin-fallback-value": "^1.0.0-alpha.5",
"fela-plugin-prefixer": "^1.0.0-alpha.5",
"fela-plugin-unit": "^1.0.0-alpha.5",
"fs-extra": "^0.30.0",
"istanbul": "^1.0.0-alpha.2",

@@ -87,442 +77,4 @@ "mocha": "^2.4.5",

"rollup-plugin-node-resolve": "^1.5.0",
"rollup-plugin-uglify": "^0.3.1",
"sinon": "^1.17.3",
"sinon-chai": "^2.8.0"
},
"babel": {
"presets": [
"es2015",
"stage-0",
"react"
],
"plugins": [
"add-module-exports",
"transform-dev-warning",
"transform-class-properties"
]
},
"eslintConfig": {
"extends": "eslint-config-rackt",
"env": {
"browser": true,
"mocha": true,
"node": true
},
"rules": {
"react/jsx-uses-react": 1,
"react/jsx-no-undef": 2,
"react/wrap-multilines": 2,
"no-console": 2,
"eol-last": 0
},
"plugins": [
"react"
]
},
"esformatter": {
"plugins": [
"esformatter-jsx",
"esformatter-quotes",
"esformatter-literal-notation",
"esformatter-parseint",
"esformatter-spaced-lined-comment",
"esformatter-var-each",
"esformatter-braces",
"esformatter-dot-notation",
"esformatter-remove-trailing-commas",
"esformatter-collapse-objects",
"esformatter-quote-props"
],
"quotes": {
"type": "single"
},
"jsx": {
"formatJSX": true,
"attrsOnSameLineAsTag": true,
"maxAttrsOnTag": 4,
"firstAttributeOnSameLine": false,
"alignWithFirstAttribute": false,
"spaceInJSXExpressionContainers": "",
"htmlOptions": {
"brace_style": "collapse",
"indent_char": " ",
"indent_size": 2,
"max_preserve_newlines": 4,
"preserve_newlines": true,
"wrap_line_length": 250
}
},
"indent": {
"value": " ",
"alignComments": true,
"ArrayExpression": 1,
"ArrowFunctionExpression": 1,
"AssignmentExpression": 1,
"AssignmentExpression.BinaryExpression": 1,
"AssignmentExpression.LogicalExpression": 1,
"AssignmentExpression.UnaryExpression": 1,
"CallExpression": 1,
"CallExpression.BinaryExpression": 1,
"CallExpression.LogicalExpression": 1,
"CallExpression.UnaryExpression": 1,
"CatchClause": 1,
"ConditionalExpression": 1,
"CommentInsideEmptyBlock": 1,
"ClassDeclaration": 1,
"DoWhileStatement": 1,
"ForInStatement": 1,
"ForStatement": 1,
"FunctionDeclaration": 1,
"FunctionExpression": 1,
"IfStatement": 1,
"MemberExpression": 1,
"MultipleVariableDeclaration": 1,
"NewExpression": 1,
"ObjectExpression": 1,
"ObjectExpression.BinaryExpression": 1,
"ObjectExpression.LogicalExpression": 1,
"ObjectExpression.UnaryExpression": 1,
"ParameterList": 1,
"ReturnStatement": 1,
"SwitchCase": 1,
"SwitchStatement": 1,
"TopLevelFunctionBlock": 1,
"TryStatement": 1,
"VariableDeclaration.BinaryExpression": 1,
"VariableDeclaration.LogicalExpression": 1,
"VariableDeclaration.UnaryExpression": 1,
"WhileStatement": 1
},
"lineBreak": {
"value": "\n",
"before": {
"AssignmentExpression": ">=1",
"AssignmentOperator": 0,
"ArrowFunctionExpressionArrow": 0,
"ArrowFunctionExpressionOpeningBrace": 0,
"ArrowFunctionExpressionClosingBrace": ">=1",
"BlockStatement": 0,
"BreakKeyword": ">=1",
"CallExpression": -1,
"CallExpressionOpeningParentheses": 0,
"CallExpressionClosingParentheses": -1,
"ClassDeclaration": ">=1",
"ClassDeclarationOpeningBrace": 0,
"ClassDeclarationClosingBrace": ">=1",
"ConditionalExpression": ">=1",
"CatchOpeningBrace": 0,
"CatchClosingBrace": ">=1",
"CatchKeyword": 0,
"DeleteOperator": ">=1",
"DoWhileStatement": ">=1",
"DoWhileStatementOpeningBrace": 0,
"DoWhileStatementClosingBrace": ">=1",
"EndOfFile": -1,
"EmptyStatement": -1,
"FinallyKeyword": -1,
"FinallyOpeningBrace": 0,
"FinallyClosingBrace": ">=1",
"ForInStatement": ">=1",
"ForInStatementExpressionOpening": 0,
"ForInStatementExpressionClosing": 0,
"ForInStatementOpeningBrace": 0,
"ForInStatementClosingBrace": ">=1",
"ForStatement": ">=1",
"ForStatementExpressionOpening": 0,
"ForStatementExpressionClosing": "<2",
"ForStatementOpeningBrace": 0,
"ForStatementClosingBrace": ">=1",
"FunctionExpression": -1,
"FunctionExpressionOpeningBrace": 0,
"FunctionExpressionClosingBrace": ">=1",
"FunctionDeclaration": ">=1",
"FunctionDeclarationOpeningBrace": 0,
"FunctionDeclarationClosingBrace": ">=1",
"IIFEClosingParentheses": 0,
"IfStatement": ">=1",
"IfStatementOpeningBrace": 0,
"IfStatementClosingBrace": ">=1",
"ElseIfStatement": 0,
"ElseIfStatementOpeningBrace": 0,
"ElseIfStatementClosingBrace": ">=1",
"ElseStatement": 0,
"ElseStatementOpeningBrace": 0,
"ElseStatementClosingBrace": ">=1",
"LogicalExpression": -1,
"MethodDefinition": ">=1",
"ObjectExpressionClosingBrace": ">=1",
"ParameterDefault": 0,
"Property": ">=1",
"PropertyValue": 0,
"ReturnStatement": -1,
"SwitchOpeningBrace": 0,
"SwitchClosingBrace": ">=1",
"ThisExpression": -1,
"ThrowStatement": ">=1",
"TryKeyword": -1,
"TryOpeningBrace": 0,
"TryClosingBrace": ">=1",
"VariableName": ">=1",
"VariableValue": 0,
"VariableDeclaration": ">=1",
"VariableDeclarationWithoutInit": ">=1",
"WhileStatement": ">=1",
"WhileStatementOpeningBrace": 0,
"WhileStatementClosingBrace": ">=1"
},
"after": {
"AssignmentExpression": ">=1",
"AssignmentOperator": 0,
"ArrowFunctionExpressionArrow": 0,
"ArrowFunctionExpressionOpeningBrace": ">=1",
"ArrowFunctionExpressionClosingBrace": -1,
"BlockStatement": 0,
"BreakKeyword": -1,
"CallExpression": -1,
"CallExpressionOpeningParentheses": -1,
"CallExpressionClosingParentheses": -1,
"ClassDeclaration": ">=1",
"ClassDeclarationOpeningBrace": ">=1",
"ClassDeclarationClosingBrace": ">=1",
"CatchOpeningBrace": ">=1",
"CatchClosingBrace": ">=0",
"CatchKeyword": 0,
"ConditionalExpression": ">=1",
"DeleteOperator": ">=1",
"DoWhileStatement": ">=1",
"DoWhileStatementOpeningBrace": ">=1",
"DoWhileStatementClosingBrace": 0,
"EmptyStatement": -1,
"FinallyKeyword": -1,
"FinallyOpeningBrace": ">=1",
"FinallyClosingBrace": ">=1",
"ForInStatement": ">=1",
"ForInStatementExpressionOpening": "<2",
"ForInStatementExpressionClosing": -1,
"ForInStatementOpeningBrace": ">=1",
"ForInStatementClosingBrace": ">=1",
"ForStatement": ">=1",
"ForStatementExpressionOpening": "<2",
"ForStatementExpressionClosing": -1,
"ForStatementOpeningBrace": ">=1",
"ForStatementClosingBrace": ">=1",
"FunctionExpression": ">=1",
"FunctionExpressionOpeningBrace": ">=1",
"FunctionExpressionClosingBrace": -1,
"FunctionDeclaration": ">=1",
"FunctionDeclarationOpeningBrace": ">=1",
"FunctionDeclarationClosingBrace": ">=1",
"IIFEOpeningParentheses": 0,
"IfStatement": ">=1",
"IfStatementOpeningBrace": ">=1",
"IfStatementClosingBrace": ">=1",
"ElseIfStatement": ">=1",
"ElseIfStatementOpeningBrace": ">=1",
"ElseIfStatementClosingBrace": ">=1",
"ElseStatement": ">=1",
"ElseStatementOpeningBrace": ">=1",
"ElseStatementClosingBrace": ">=1",
"LogicalExpression": -1,
"MethodDefinition": ">=1",
"ObjectExpressionOpeningBrace": ">=1",
"ParameterDefault": 0,
"Property": 0,
"PropertyName": 0,
"ReturnStatement": -1,
"SwitchOpeningBrace": ">=1",
"SwitchClosingBrace": ">=1",
"ThisExpression": 0,
"ThrowStatement": ">=1",
"TryKeyword": -1,
"TryOpeningBrace": ">=1",
"TryClosingBrace": 0,
"VariableDeclaration": ">=1",
"WhileStatement": ">=1",
"WhileStatementOpeningBrace": ">=1",
"WhileStatementClosingBrace": ">=1"
}
},
"whiteSpace": {
"value": " ",
"removeTrailing": 1,
"before": {
"ArrayExpressionOpening": 0,
"ArrayExpressionClosing": 1,
"ArrayExpressionComma": 0,
"ArrayPatternOpening": 1,
"ArrayPatternClosing": 1,
"ArrayPatternComma": 0,
"ArrowFunctionExpressionArrow": 1,
"ArrowFunctionExpressionOpeningBrace": 1,
"ArrowFunctionExpressionClosingBrace": 0,
"ArgumentComma": 0,
"ArgumentList": 0,
"AssignmentOperator": 1,
"BinaryExpression": 0,
"BinaryExpressionOperator": 1,
"BlockComment": 1,
"CallExpression": -1,
"CallExpressionOpeningParentheses": 0,
"CallExpressionClosingParentheses": -1,
"CatchParameterList": 0,
"CatchOpeningBrace": 1,
"CatchClosingBrace": 1,
"CatchKeyword": 1,
"CommaOperator": 0,
"ClassDeclarationOpeningBrace": 1,
"ClassDeclarationClosingBrace": 1,
"ConditionalExpressionConsequent": 1,
"ConditionalExpressionAlternate": 1,
"DoWhileStatementOpeningBrace": 1,
"DoWhileStatementClosingBrace": 1,
"DoWhileStatementConditional": 1,
"EmptyStatement": 0,
"ExpressionClosingParentheses": 0,
"FinallyKeyword": -1,
"FinallyOpeningBrace": 1,
"FinallyClosingBrace": 1,
"ForInStatement": 1,
"ForInStatementExpressionOpening": 1,
"ForInStatementExpressionClosing": 0,
"ForInStatementOpeningBrace": 1,
"ForInStatementClosingBrace": 1,
"ForStatement": 1,
"ForStatementExpressionOpening": 1,
"ForStatementExpressionClosing": 0,
"ForStatementOpeningBrace": 1,
"ForStatementClosingBrace": 1,
"ForStatementSemicolon": 0,
"FunctionDeclarationOpeningBrace": 1,
"FunctionDeclarationClosingBrace": 1,
"FunctionExpressionOpeningBrace": 1,
"FunctionExpressionClosingBrace": 1,
"FunctionName": 1,
"IIFEClosingParentheses": 0,
"IfStatementConditionalOpening": 1,
"IfStatementConditionalClosing": 0,
"IfStatementOpeningBrace": 1,
"IfStatementClosingBrace": 1,
"ElseStatementOpeningBrace": 1,
"ElseStatementClosingBrace": 1,
"ElseIfStatementOpeningBrace": 1,
"ElseIfStatementClosingBrace": 1,
"LineComment": 1,
"LogicalExpressionOperator": 1,
"MemberExpressionClosing": 0,
"ObjectExpressionOpeningBrace": -1,
"ObjectExpressionClosingBrace": 1,
"ObjectPatternOpeningBrace": 1,
"ObjectPatternClosingBrace": 1,
"ObjectPatternComma": 0,
"PropertyName": 1,
"PropertyValue": 1,
"ParameterComma": 0,
"ParameterDefault": 1,
"ParameterList": 0,
"SwitchDiscriminantOpening": 1,
"SwitchDiscriminantClosing": 0,
"ThrowKeyword": 1,
"TryKeyword": -1,
"TryOpeningBrace": 1,
"TryClosingBrace": 1,
"UnaryExpressionOperator": 0,
"VariableName": 1,
"VariableValue": 1,
"WhileStatementConditionalOpening": 1,
"WhileStatementConditionalClosing": 0,
"WhileStatementOpeningBrace": 1,
"WhileStatementClosingBrace": 1
},
"after": {
"ArrayExpressionOpening": 1,
"ArrayExpressionClosing": 0,
"ArrayExpressionComma": 1,
"ArrayPatternOpening": 1,
"ArrayPatternClosing": 0,
"ArrayPatternComma": 1,
"ArrowFunctionExpressionArrow": 1,
"ArrowFunctionExpressionOpeningBrace": 0,
"ArrowFunctionExpressionClosingBrace": 0,
"ArgumentComma": 1,
"ArgumentList": 0,
"AssignmentOperator": 1,
"BinaryExpression": 0,
"BinaryExpressionOperator": 1,
"BlockComment": 1,
"CallExpression": -1,
"CallExpressionOpeningParentheses": -1,
"CallExpressionClosingParentheses": -1,
"CatchParameterList": 0,
"CatchOpeningBrace": 1,
"CatchClosingBrace": 1,
"CatchKeyword": 1,
"ClassDeclarationOpeningBrace": 1,
"ClassDeclarationClosingBrace": 1,
"CommaOperator": 1,
"ConditionalExpressionConsequent": 1,
"ConditionalExpressionTest": 1,
"DoWhileStatementOpeningBrace": 1,
"DoWhileStatementClosingBrace": 1,
"DoWhileStatementBody": 1,
"EmptyStatement": 0,
"ExpressionOpeningParentheses": 0,
"FinallyKeyword": -1,
"FinallyOpeningBrace": 1,
"FinallyClosingBrace": 1,
"ForInStatement": 1,
"ForInStatementExpressionOpening": 0,
"ForInStatementExpressionClosing": 1,
"ForInStatementOpeningBrace": 1,
"ForInStatementClosingBrace": 1,
"ForStatement": 1,
"ForStatementExpressionOpening": 0,
"ForStatementExpressionClosing": 1,
"ForStatementClosingBrace": 1,
"ForStatementOpeningBrace": 1,
"ForStatementSemicolon": 1,
"FunctionReservedWord": 0,
"FunctionName": 0,
"FunctionExpressionOpeningBrace": 1,
"FunctionExpressionClosingBrace": 0,
"FunctionDeclarationOpeningBrace": 1,
"FunctionDeclarationClosingBrace": 1,
"IIFEOpeningParentheses": 0,
"IfStatementConditionalOpening": 0,
"IfStatementConditionalClosing": 1,
"IfStatementOpeningBrace": 1,
"IfStatementClosingBrace": 1,
"ElseStatementOpeningBrace": 1,
"ElseStatementClosingBrace": 1,
"ElseIfStatementOpeningBrace": 1,
"ElseIfStatementClosingBrace": 1,
"MemberExpressionOpening": 0,
"LogicalExpressionOperator": 1,
"ObjectExpressionOpeningBrace": 1,
"ObjectExpressionClosingBrace": 0,
"ObjectPatternOpeningBrace": 1,
"ObjectPatternClosingBrace": 0,
"ObjectPatternComma": 1,
"PropertyName": 0,
"PropertyValue": 0,
"ParameterComma": 1,
"ParameterDefault": 1,
"ParameterList": 0,
"SwitchDiscriminantOpening": 0,
"SwitchDiscriminantClosing": 1,
"ThrowKeyword": 1,
"TryKeyword": -1,
"TryOpeningBrace": 1,
"TryClosingBrace": 1,
"UnaryExpressionOperator": 0,
"VariableName": 1,
"WhileStatementConditionalOpening": 0,
"WhileStatementConditionalClosing": 1,
"WhileStatementOpeningBrace": 1,
"WhileStatementClosingBrace": 1
}
}
},
"dependencies": {
"fbjs": "^0.8.3"
"rollup-plugin-uglify": "^0.3.1"
}
}
# React Fela
Official React bindings for Fela.
Official [React](https://github.com/facebook/react) bindings for Fela.

@@ -8,3 +8,3 @@ <img alt="TravisCI" src="https://travis-ci.org/rofrischmann/react-fela.svg?branch=master">

<img alt="npm downloads" src="https://img.shields.io/npm/dm/react-fela.svg">
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-~1.16kb-brightgreen.svg">
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-1.16kb-brightgreen.svg">

@@ -24,3 +24,3 @@

Assuming you are using [npm](https://www.npmjs.com) as your package mananger you can basically just `npm install` all packages. <br>
Otherwise we also provide [UMD](https://github.com/umdjs/umd) builds for each package within the `dist` folder. You can easily use them via [npmcdn](https://npmcdn.com/).
Otherwise we also provide [UMD](https://github.com/umdjs/umd) builds for each package within the `dist` folder. You can easily use them via [unpkg](https://unpkg.com/).
> **Caution**: You need to include both React and Fela on your own as well.

@@ -30,5 +30,5 @@

<!-- Development build (with warnings) -->
<script src="https://npmcdn.com/react-fela@2.0.0/dist/react-fela.js"></script>
<script src="https://unpkg.com/react-fela@3.0.0/dist/react-fela.js"></script>
<!-- Production build (minified) -->
<script src="https://npmcdn.com/react-fela@2.0.0/dist/react-fela.min.js"></script>
<script src="https://unpkg.com/react-fela@3.0.0/dist/react-fela.min.js"></script>
```

@@ -40,6 +40,6 @@

* [`connect(mapStylesToProps)`](docs/connect.md)
* [`createComponent(rule, [type])`](docs/createComponent.md)
* [`createComponent(rule, [type], [passThroughProps])`](docs/createComponent.md)
## Usage
For more information and best practices on how to effectively use this package, please check out the main [Fela documention](http://fela.js.org). There you will also find some usage examples. This package only contains the pure API reference documentation.
For more information and best practices on how to effectively use this package, please check out the main [Fela Documention - Usage with React](http://fela.js.org/docs/guides/UsageWithReact.html). There you will also find some usage examples. This package only contains the pure API reference documentation.

@@ -46,0 +46,0 @@ ## License

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc