Skip to content

Commit ca3722f

Browse files
committed
rename main.js to index.js
1 parent c643e8c commit ca3722f

File tree

9 files changed

+9
-10
lines changed

9 files changed

+9
-10
lines changed

examples/basic/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { Tab, Tabs, TabList, TabPanel } from '../../src/main';
3+
import { Tab, Tabs, TabList, TabPanel } from '../../src/index';
44
import '../../style/react-tabs.css';
55

66
const App = () => {

examples/conditional/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { Tab, Tabs, TabList, TabPanel } from '../../src/main';
3+
import { Tab, Tabs, TabList, TabPanel } from '../../src/index';
44
import '../../style/react-tabs.css';
55

66
class App extends React.Component {

examples/dyno/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
33
import Modal from 'react-modal';
4-
import { Tab, Tabs, TabList, TabPanel } from '../../src/main';
4+
import { Tab, Tabs, TabList, TabPanel } from '../../src/index';
55
import '../../style/react-tabs.css';
66

77
Modal.setAppElement(document.getElementById('example'));

examples/focus/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { Tab, Tabs, TabList, TabPanel } from '../../src/main';
3+
import { Tab, Tabs, TabList, TabPanel } from '../../src/index';
44
import '../../style/react-tabs.css';
55

66
class App extends React.Component {

examples/nested/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { Tab, Tabs, TabList, TabPanel } from '../../src/main';
3+
import { Tab, Tabs, TabList, TabPanel } from '../../src/index';
44
import '../../style/react-tabs.css';
55

66
const App = () => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-tabs",
33
"version": "0.8.2",
44
"description": "React tabs component",
5-
"main": "lib/main.js",
5+
"main": "lib/index.js",
66
"scripts": {
77
"clean": "rimraf lib",
88
"build:commonjs": "babel src/ --out-dir lib/ --ignore __tests__,__mocks__",

src/__tests__/main-test.js renamed to src/__tests__/index-test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/* eslint-env jest */
2-
/* eslint-disable import/no-named-as-default-member */
3-
import { Tab, Tabs, TabList, TabPanel } from '../main';
2+
import { Tab, Tabs, TabList, TabPanel } from '../index';
43
import TabComponent from '../components/Tab';
54
import TabListComponent from '../components/TabList';
65
import TabsComponent from '../components/Tabs';
76
import TabPanelComponent from '../components/TabPanel';
87

9-
describe('main.js', () => {
8+
describe('index.js', () => {
109
it('should correctly export all component as named export', () => {
1110
expect(Tab).toEqual(TabComponent);
1211
expect(TabList).toEqual(TabListComponent);
File renamed without changes.

webpack.build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (process.env.MINIFY) {
1313
}
1414

1515
module.exports = {
16-
entry: path.join(__dirname, require(path.join(__dirname, 'package.json')).main),
16+
entry: path.join(__dirname, 'src/index.js'),
1717
output: {
1818
filename: COMPONENT_FILE + '.js',
1919
path: path.join(__dirname, 'dist'),

0 commit comments

Comments
 (0)