Skip to content

Commit

Permalink
Remove babel-polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerumen committed Aug 21, 2017
1 parent f1d7697 commit 639ddc1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 33 deletions.
18 changes: 6 additions & 12 deletions build/Outline.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ var _util = require('./shared/util');

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

// eslint-disable-next-line no-underscore-dangle
if (!window._babelPolyfill) {
// eslint-disable-next-line global-require
require('babel-polyfill');
}

var Ref = function () {
function Ref(_ref) {
var num = _ref.num,
Expand Down Expand Up @@ -165,7 +159,7 @@ var Outline = function (_Component) {
}, {
key: 'mapOutlineItem',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(item) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(item) {
var _this5 = this;

var pdf, mappedItem;
Expand All @@ -180,7 +174,7 @@ var Outline = function (_Component) {
getDestination: function getDestination() {
var _this2 = this;

return (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() {
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
Expand All @@ -206,7 +200,7 @@ var Outline = function (_Component) {
getPageIndex: function getPageIndex() {
var _this3 = this;

return (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2() {
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
var destination, _destination, ref;

return _regenerator2.default.wrap(function _callee2$(_context2) {
Expand Down Expand Up @@ -244,7 +238,7 @@ var Outline = function (_Component) {
getPageNumber: function getPageNumber() {
var _this4 = this;

return (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3() {
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
return _regenerator2.default.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
Expand Down Expand Up @@ -307,7 +301,7 @@ var Outline = function (_Component) {
}, {
key: 'parseOutline',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(outline) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(outline) {
var _this6 = this;

return _regenerator2.default.wrap(function _callee5$(_context5) {
Expand Down Expand Up @@ -343,7 +337,7 @@ var Outline = function (_Component) {
}, {
key: 'onItemClick',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6(item) {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(item) {
var pageIndex, pageNumber;
return _regenerator2.default.wrap(function _callee6$(_context6) {
while (1) {
Expand Down
10 changes: 2 additions & 8 deletions build/PageTextContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ var _util = require('./shared/util');

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

// eslint-disable-next-line no-underscore-dangle
if (!window._babelPolyfill) {
// eslint-disable-next-line global-require
require('babel-polyfill');
}

// Render disproportion above which font will be considered broken and fallback will be used
var BROKEN_FONT_ALARM_THRESHOLD = 0.1;

Expand Down Expand Up @@ -158,7 +152,7 @@ var PageTextContent = function (_Component) {
}, {
key: 'getFontData',
value: function () {
var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(fontFamily) {
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(fontFamily) {
var page, font;
return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
Expand Down Expand Up @@ -189,7 +183,7 @@ var PageTextContent = function (_Component) {
}, {
key: 'alignTextItem',
value: function () {
var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(element, textItem) {
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(element, textItem) {
var scale, targetWidth, fontData, actualWidth, widthDisproportion, repairsNeeded, fallbackFontName, ascent;
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
],
"license": "MIT",
"dependencies": {
"babel-polyfill": "^6.23.0",
"babel-runtime": "^6.25.0",
"pdfjs-dist": "^1.8.618",
"prop-types": ">=15.5",
Expand Down
6 changes: 0 additions & 6 deletions src/Outline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ import {
makeCancellable,
} from './shared/util';

// eslint-disable-next-line no-underscore-dangle
if (!window._babelPolyfill) {
// eslint-disable-next-line global-require
require('babel-polyfill');
}

class Ref {
constructor({ num, gen }) {
this.num = num;
Expand Down
6 changes: 0 additions & 6 deletions src/PageTextContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import {
callIfDefined,
} from './shared/util';

// eslint-disable-next-line no-underscore-dangle
if (!window._babelPolyfill) {
// eslint-disable-next-line global-require
require('babel-polyfill');
}

// Render disproportion above which font will be considered broken and fallback will be used
const BROKEN_FONT_ALARM_THRESHOLD = 0.1;

Expand Down

0 comments on commit 639ddc1

Please sign in to comment.