Skip to content

Commit 146a6c8

Browse files
authored
Merge pull request #82 from react-component/feat-es
feat: expose es files
2 parents 18e9c12 + 8a7ca6b commit 146a6c8

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ dist
2424
assets/**/*.css
2525
build
2626
lib
27+
es
2728
coverage
2829
yarn.lock

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
module.exports = require('./src/');
1+
import Tooltip from './src';
2+
3+
export default Tooltip;

package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
],
1111
"files": [
1212
"lib",
13+
"es",
1314
"assets/*.css"
1415
],
1516
"main": "lib/index",
17+
"module": "es/index",
1618
"homepage": "http://github.com/react-component/tooltip",
1719
"maintainers": [
1820
@@ -32,14 +34,15 @@
3234
"build": "rc-tools run build",
3335
"gh-pages": "rc-tools run gh-pages",
3436
"start": "rc-tools run server",
37+
"compile": "rc-tools run compile --babel-runtime",
3538
"pub": "rc-tools run pub --babel-runtime",
3639
"lint": "rc-tools run lint",
37-
"karma": "rc-tools run karma",
38-
"saucelabs": "rc-tools run saucelabs",
39-
"test": "rc-tools run test",
40+
"karma": "rc-test run karma",
41+
"saucelabs": "rc-test run saucelabs",
42+
"test": "rc-test run test",
4043
"prepublish": "rc-tools run guard",
41-
"chrome-test": "rc-tools run chrome-test",
42-
"coverage": "rc-tools run coverage"
44+
"chrome-test": "rc-test run chrome-test",
45+
"coverage": "rc-test run coverage"
4346
},
4447
"devDependencies": {
4548
"async": "~0.9.0",
@@ -48,7 +51,8 @@
4851
"jquery": "~1.11.2",
4952
"object-assign": "~4.0.1",
5053
"pre-commit": "1.x",
51-
"rc-tools": "5.x",
54+
"rc-test": "^6.0.1",
55+
"rc-tools": "6.x",
5256
"react": "15.x",
5357
"react-dom": "15.x"
5458
},

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
module.exports = require('./Tooltip');
1+
import Tooltip from './Tooltip';
2+
3+
export default Tooltip;

0 commit comments

Comments
 (0)