Skip to content

Commit

Permalink
Revert "Unstable minification"
Browse files Browse the repository at this point in the history
This reverts commit 4ff861d
  • Loading branch information
mmarkelov committed Feb 11, 2019
1 parent 4ff861d commit 95be0ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3,761 deletions.
9 changes: 2 additions & 7 deletions src/API.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* global document, window */
import minified from "./minified";

export default class VKApi {
constructor(apiId, options = {}) {
Expand All @@ -18,7 +17,7 @@ export default class VKApi {
init() {
const {
apiId,
options: { version, onlyWidgets, unstable_useMinified }
options: { version, onlyWidgets }
} = this;

if (this.promise) return this.promise;
Expand All @@ -43,11 +42,7 @@ export default class VKApi {

script.type = "text/javascript";
script.id = "vk-openapi";
if (!unstable_useMinified) {
script.src = baseUrl;
} else {
script.text = minified;
}
script.src = baseUrl;
script.async = true;

document.head.appendChild(script);
Expand Down
6 changes: 2 additions & 4 deletions src/VK.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@ export default class VK extends React.Component {
apiId: PropTypes.number.isRequired,
options: PropTypes.shape({
version: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
onlyWidgets: PropTypes.bool,
unstable_useMinified: PropTypes.bool
onlyWidgets: PropTypes.bool
}),
onApiAvailable: PropTypes.func
};

static defaultProps = {
options: {
version: 160,
onlyWidgets: true,
unstable_useMinified: true
onlyWidgets: true
},
onApiAvailable: () => {}
};
Expand Down
1 change: 0 additions & 1 deletion src/minified.js

This file was deleted.

0 comments on commit 95be0ba

Please sign in to comment.