Skip to content

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.babelrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"presets": ["react", "es2015", "stage-0"],
33
"plugins": [
44
"add-module-exports",
5-
"transform-es2015-modules-umd"
5+
["transform-es2015-modules-umd", {
6+
"globals": {
7+
"react": "React"
8+
}
9+
}]
610
]
711
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ var TextTruncate = require('react-text-truncate'); // CommonJS or UMD
2929

3030

3131
## Changelog
32+
* 0.6.1 Fix lib issue for browser
3233
* 0.6.0 Support React 15
3334
* 0.5.2 Fix server render bug
3435
* 0.5.1 Hide `textTruncateChild` when nothing truncated

build/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
var mod = {
88
exports: {}
99
};
10-
factory(mod, mod.exports, global.react);
10+
factory(mod, mod.exports, global.React);
1111
global.TextTruncate = mod.exports;
1212
}
1313
})(this, function (module, exports, _react) {
@@ -233,7 +233,8 @@
233233
showTitle: true,
234234
raf: true
235235
};
236-
exports.default = TextTruncate;
237236
;
237+
238+
exports.default = TextTruncate;
238239
module.exports = exports['default'];
239240
});

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-text-truncate",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Truncate text for React.js",
55
"main": "lib/index.js",
66
"scripts": {
@@ -25,12 +25,12 @@
2525
},
2626
"homepage": "https://github.com/ShinyChang/react-text-truncate",
2727
"devDependencies": {
28-
"babel-cli": "^6.7.5",
29-
"babel-core": "^6.7.6",
28+
"babel-cli": "^6.8.0",
29+
"babel-core": "^6.8.0",
3030
"babel-loader": "^6.2.4",
3131
"babel-plugin-add-module-exports": "^0.1.2",
3232
"babel-plugin-react-transform": "^2.0.2",
33-
"babel-plugin-transform-es2015-modules-umd": "^6.6.5",
33+
"babel-plugin-transform-es2015-modules-umd": "^6.8.0",
3434
"babel-preset-es2015": "^6.6.0",
3535
"babel-preset-react": "^6.5.0",
3636
"babel-preset-stage-0": "^6.5.0",

0 commit comments

Comments
 (0)