Skip to content

Commit

Permalink
Correct static method and module exports (#229)
Browse files Browse the repository at this point in the history
* Correct static method and module exports
  • Loading branch information
roderickhsiao authored Apr 9, 2019
1 parent 097ff4e commit 4de16dd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-i13n",
"description": "React I13n provides a performant and scalable solution to application instrumentation.",
"version": "3.0.0-alpha.2",
"version": "3.0.0-alpha.3",
"main": "index.js",
"module": "index.es.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ComponentSpecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import I13nNode from './I13nNode';
import warnAndPrintTrace from '../utils/warnAndPrintTrace';
import isUndefined from '../utils/isUndefined';
import { IS_CLIENT, IS_PROD } from '../utils/variables';
import ViewportDetector from './ViewportDetector';

const debug = require('debug')('I13nComponent');
const ViewportDetector = require('./ViewportDetector');

const IS_DEBUG_MODE = (function isDebugMode() {
if (!IS_CLIENT) {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ReactI13n.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ReactI13n {
* @method getInstance
* @return the ReactI13n instance
*/
getInstance() {
static getInstance() {
if (IS_CLIENT) {
return window._reactI13nInstance;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ViewportDetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ ViewportDetector.prototype.isEnteredViewport = function () {
return this._enteredViewport;
};

module.exports = ViewportDetector;
export default ViewportDetector;
10 changes: 5 additions & 5 deletions tests/functional/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ window.ReactDOM = require('react-dom');
// TODO, this should be deprecated
window.createClass = require('create-react-class');

window.I13nAnchor = require('../../dist/components/I13nAnchor');
window.I13nButton = require('../../dist/components/I13nButton');
window.I13nDiv = require('../../dist/components/I13nDiv');
window.I13nAnchor = require('../../index').I13nAnchor;
window.I13nButton = require('../../index').I13nButton;
window.I13nDiv = require('../../index').I13nDiv;

window.createI13nNode = require('../../dist/utils/createI13nNode');
window.createI13nNode = require('../../index').createI13nNode;
window.setupI13n = require('../../index').setupI13n;
window.clickHandler = require('../../dist/libs/clickHandler');
window.setupI13n = require('../../dist/utils/setupI13n');

0 comments on commit 4de16dd

Please sign in to comment.