From 8e8f43aec50ab267bf38b83780ccc3967b307d7f Mon Sep 17 00:00:00 2001 From: rizzomichaelg Date: Fri, 12 Oct 2018 09:12:41 -0400 Subject: [PATCH] update version and build --- .babelrc | 8 +++-- lib/MobileStoreButton.js | 65 ++++++++++++++++++++-------------------- package.json | 11 ++++--- 3 files changed, 43 insertions(+), 41 deletions(-) diff --git a/.babelrc b/.babelrc index 477709b..a57c2d3 100644 --- a/.babelrc +++ b/.babelrc @@ -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"] } \ No newline at end of file diff --git a/lib/MobileStoreButton.js b/lib/MobileStoreButton.js index c5be679..513a36c 100644 --- a/lib/MobileStoreButton.js +++ b/lib/MobileStoreButton.js @@ -15,7 +15,9 @@ 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"); } } @@ -23,9 +25,17 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+ 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', @@ -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"), @@ -74,7 +84,7 @@ function (_React$Component) { style: linkStyles, href: url, target: "_blank", - rel: "noopener noreferrer", + rel: "noopener noreferrer" }, linkProps), "\xA0")); } }]); @@ -82,27 +92,18 @@ function (_React$Component) { 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; \ No newline at end of file diff --git a/package.json b/package.json index d1f4da8..0518b68 100644 --- a/package.json +++ b/package.json @@ -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" } }