Skip to content

Commit

Permalink
update version and build
Browse files Browse the repository at this point in the history
  • Loading branch information
rizzomichaelg committed Oct 12, 2018
1 parent 51683f1 commit 8e8f43a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 41 deletions.
8 changes: 5 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
"@babel/preset-env",
{
"targets": {
"browsers": [">1%", "last 4 versions", "Firefox ESR", "not ie < 9"],
"forceAllTransforms": true
"browsers": [">1%", "last 4 versions", "Firefox ESR", "not ie < 9"]
},
"forceAllTransforms": true,
"useBuiltIns": false
}
],
"@babel/preset-stage-2",
"@babel/preset-react"
],
"plugins": [
"@babel/proposal-class-properties"
],
"ignore": ["node_modules"]
}
65 changes: 33 additions & 32 deletions lib/MobileStoreButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,27 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat

function _extends() { _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; }; return _extends.apply(this, arguments); }

function _objectWithoutProperties(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]; } 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 _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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

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; }

var imageLinks = {
ios: 'https://linkmaker.itunes.apple.com/images/badges/en-us/badge_appstore-lrg.svg',
Expand All @@ -40,19 +50,19 @@ function (_React$Component) {
function MobileStoreButton() {
_classCallCheck(this, MobileStoreButton);

return _possibleConstructorReturn(this, (MobileStoreButton.__proto__ || Object.getPrototypeOf(MobileStoreButton)).apply(this, arguments));
return _possibleConstructorReturn(this, _getPrototypeOf(MobileStoreButton).apply(this, arguments));
}

_createClass(MobileStoreButton, [{
key: "render",
value: function render() {
var _props = this.props,
store = _props.store,
url = _props.url,
height = _props.height,
width = _props.width,
linkProps = _props.linkProps,
props = _objectWithoutProperties(_props, ["store", "url", "height", "width", "linkProps"]);
var _this$props = this.props,
store = _this$props.store,
url = _this$props.url,
height = _this$props.height,
width = _this$props.width,
linkProps = _this$props.linkProps,
props = _objectWithoutProperties(_this$props, ["store", "url", "height", "width", "linkProps"]);

var linkStyles = {
background: "url(".concat(imageLinks[store], ") no-repeat"),
Expand All @@ -74,35 +84,26 @@ function (_React$Component) {
style: linkStyles,
href: url,
target: "_blank",
rel: "noopener noreferrer",
rel: "noopener noreferrer"
}, linkProps), "\xA0"));
}
}]);

return MobileStoreButton;
}(_react.default.Component);

Object.defineProperty(MobileStoreButton, "propTypes", {
configurable: true,
enumerable: true,
writable: true,
value: {
store: _propTypes.default.oneOf(['ios', 'android']).isRequired,
url: _propTypes.default.string.isRequired,
height: _propTypes.default.number,
width: _propTypes.default.number,
linkProps: _propTypes.default.object
}
_defineProperty(MobileStoreButton, "propTypes", {
store: _propTypes.default.oneOf(['ios', 'android']).isRequired,
url: _propTypes.default.string.isRequired,
height: _propTypes.default.number,
width: _propTypes.default.number,
linkProps: _propTypes.default.object
});
Object.defineProperty(MobileStoreButton, "defaultProps", {
configurable: true,
enumerable: true,
writable: true,
value: {
height: 75,
width: 255
},
linkProps: {}

_defineProperty(MobileStoreButton, "defaultProps", {
height: 75,
width: 255
});

var _default = MobileStoreButton;
exports.default = _default;
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.36",
"@babel/core": "7.0.0-beta.36",
"@babel/preset-env": "7.0.0-beta.36",
"@babel/preset-react": "7.0.0-beta.36",
"@babel/preset-stage-2": "7.0.0-beta.36",
"babel-core": "^7.0.0-0",
"babel-loader": "8.0.0-beta.0"
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/preset-env": "7.1.0",
"@babel/preset-react": "7.0.0",
"babel-loader": "8.0.0"
}
}

0 comments on commit 8e8f43a

Please sign in to comment.