Skip to content

Commit

Permalink
Release 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robmadole committed Dec 13, 2019
1 parent 85e7298 commit 97fa749
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 34 deletions.
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nodejs 12.6.0
python 3.7.5
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

---

## [0.2.0](https://github.com/FortAwesome/react-native-fontawesome/releases/tag/0.2.0) - 2019-12-13

### Added

- TypeScript definition file #17

### Changed

- Loosened peer dependencies to prevent incorrect version warnings

## [0.1.0](https://github.com/FortAwesome/react-native-fontawesome/releases/tag/0.1.0) - 2019-01-07

### Changed
Expand Down
18 changes: 10 additions & 8 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,14 @@ And change it to something like this:

<a name="release"></a>

1. Edit `package.json` and update the version number
1. Add new contributors to the `contributors` section
1. Update the `CHANGELOG.md`
1. Edit `package.json` and update the version number
1. Add new contributors to the `contributors` section
1. Update the `CHANGELOG.md`
1. `npm run dist`
1. `npm run test`
1. `npm publish`
1. `git add . && git commit -m 'Release VERSION'`
1. `git push`
1. Create a [new release](https://github.com/FortAwesome/react-native-fontawesome/releases/new) with `CHANGELOG` details
1. `npm run test`
1. `npm publish`
1. `npm pack`
1. `CLOUDSMITH_API_KEY=API_TOKEN cloudsmith upload npm fortawesome/fontawesome-pro ./fortawesome-react-native-fontawesome-VERSION.tgz`
1. `git add . && git commit -m 'Release VERSION'`
1. `git push`
1. Create a [new release](https://github.com/FortAwesome/react-native-fontawesome/releases/new) with `CHANGELOG` details
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,12 @@ And then:

## Contributors

Community:

| | Name | GitHub |
| :-----------------------------------------------: | ------ | -------------------------------- |
| <img src="https://github.com/dizy.png?size=72" /> | Dizy | [@dizy](https://github.com/dizy) |

The Font Awesome team:

| | Name | GitHub |
Expand All @@ -425,4 +431,3 @@ The Font Awesome team:
| <img src="https://github.com/robmadole.png?size=72" /> | Rob Madole | [@robmadole](https://github.com/robmadole) |
| <img src="https://github.com/mlwilkerson.png?size=72" /> | Mike Wilkerson | [@mlwilkerson](https://github.com/mlwilkerson) |
| <img src="https://github.com/talbs.png?size=72" /> | Brian Talbot | [@talbs](https://github.com/talbs) |

34 changes: 18 additions & 16 deletions dist/components/FontAwesomeIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = FontAwesomeIcon;
exports["default"] = FontAwesomeIcon;
exports.DEFAULT_COLOR = exports.DEFAULT_SIZE = void 0;

var _react = _interopRequireDefault(require("react"));
Expand All @@ -18,13 +18,15 @@ var _fontawesomeSvgCore = require("@fortawesome/fontawesome-svg-core");

var _logger = _interopRequireDefault(require("../logger"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

Expand Down Expand Up @@ -80,14 +82,14 @@ function FontAwesomeIcon(props) {
var iconLookup = normalizeIconArgs(iconArgs);
var transform = objectWithKey('transform', typeof props.transform === 'string' ? _fontawesomeSvgCore.parse.transform(props.transform) : props.transform);
var mask = objectWithKey('mask', normalizeIconArgs(maskArgs));
var renderedIcon = (0, _fontawesomeSvgCore.icon)(iconLookup, _objectSpread({}, transform, mask));
var renderedIcon = (0, _fontawesomeSvgCore.icon)(iconLookup, _objectSpread({}, transform, {}, mask));

if (!renderedIcon) {
(0, _logger.default)("ERROR: icon not found for icon = ", iconArgs);
(0, _logger["default"])("ERROR: icon not found for icon = ", iconArgs);
return null;
}

var abstract = renderedIcon.abstract; // This is the color that will be passed to the "fill" prop of the Svg element
var _abstract = renderedIcon["abstract"]; // This is the color that will be passed to the "fill" prop of the Svg element

var color = props.color || style.color || DEFAULT_COLOR; // To avoid confusion down the line, we'll remove properties from the StyleSheet, like color, that are being overridden
// or resolved in other ways, to avoid ambiguity as to which inputs cause which outputs in the underlying rendering process.
Expand Down Expand Up @@ -122,19 +124,19 @@ function FontAwesomeIcon(props) {
extraProps[key] = props[key];
}
});
return convertCurry(abstract[0], extraProps);
return convertCurry(_abstract[0], extraProps);
}

FontAwesomeIcon.displayName = 'FontAwesomeIcon';
FontAwesomeIcon.propTypes = {
height: _propTypes.default.number,
width: _propTypes.default.number,
size: _propTypes.default.number,
color: _propTypes.default.string,
style: _propTypes.default.shape(_objectSpread({}, _reactNative.ViewPropTypes.style)),
icon: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.array, _propTypes.default.string]),
mask: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.array, _propTypes.default.string]),
transform: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object])
height: _propTypes["default"].number,
width: _propTypes["default"].number,
size: _propTypes["default"].number,
color: _propTypes["default"].string,
style: _propTypes["default"].shape(_objectSpread({}, _reactNative.ViewPropTypes.style)),
icon: _propTypes["default"].oneOfType([_propTypes["default"].object, _propTypes["default"].array, _propTypes["default"].string]),
mask: _propTypes["default"].oneOfType([_propTypes["default"].object, _propTypes["default"].array, _propTypes["default"].string]),
transform: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].object])
};
FontAwesomeIcon.defaultProps = {
icon: null,
Expand All @@ -148,4 +150,4 @@ FontAwesomeIcon.defaultProps = {

};

var convertCurry = _converter.default.bind(null, _react.default.createElement);
var convertCurry = _converter["default"].bind(null, _react["default"].createElement);
14 changes: 8 additions & 6 deletions dist/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
exports["default"] = void 0;

var _humps = _interopRequireDefault(require("humps"));

var _reactNativeSvg = require("react-native-svg");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

Expand Down Expand Up @@ -58,7 +60,7 @@ function convert(createElement, element) {
if (key.indexOf('aria-') === 0 || key.indexOf('data-') === 0 || 'fill' === key && 'currentColor' === val) {
delete element.attributes[key];
} else {
acc.attrs[_humps.default.camelize(key)] = val;
acc.attrs[_humps["default"].camelize(key)] = val;
}

}
Expand All @@ -67,8 +69,8 @@ function convert(createElement, element) {
}, {
attrs: {}
});
return createElement.apply(void 0, [svgObjectMap[element.tag], _objectSpread({}, mixins.attrs, extraProps)].concat(_toConsumableArray(children)));
return createElement.apply(void 0, [svgObjectMap[element.tag], _objectSpread({}, mixins.attrs, {}, extraProps)].concat(_toConsumableArray(children)));
}

var _default = convert;
exports.default = _default;
exports["default"] = _default;
2 changes: 1 addition & 1 deletion dist/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
exports["default"] = _default;
var PRODUCTION = false;

function _default() {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fortawesome/react-native-fontawesome",
"version": "0.1.0",
"version": "0.2.0",
"description": "Official React Native component for Font Awesome 5",
"main": "index.js",
"scripts": {
Expand All @@ -17,7 +17,8 @@
"contributors": [
"Travis Chase <[email protected]>",
"Rob Madole <[email protected]>",
"Mike Wilkerson <[email protected]>"
"Mike Wilkerson <[email protected]>",
"Dizy <[email protected]>"
],
"license": "MIT",
"peerDependencies": {
Expand Down

0 comments on commit 97fa749

Please sign in to comment.