Skip to content

Commit 3a8390c

Browse files
committed
react-bootstrap-table2-example depend other packages via webpack resolver instead of node modules
1 parent afc742c commit 3a8390c

File tree

14 files changed

+34
-29
lines changed

14 files changed

+34
-29
lines changed

packages/react-bootstrap-table2-editor/src/index.js packages/react-bootstrap-table2-editor/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import wrapperFactory from './wrapper';
2-
import editingCellFactory from './editing-cell';
1+
import wrapperFactory from './src/wrapper';
2+
import editingCellFactory from './src/editing-cell';
33
import {
44
CLICK_TO_CELL_EDIT,
55
DBCLICK_TO_CELL_EDIT,
66
DELAY_FOR_DBCLICK
7-
} from './const';
7+
} from './src/const';
88

99
export default (options = {}) => ({
1010
wrapperFactory,

packages/react-bootstrap-table2-editor/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-bootstrap-table2-editor",
33
"version": "0.0.1",
44
"description": "it's the editor addon for react-bootstrap-table2",
5-
"main": "src/index.js",
5+
"main": "./dist/react-bootstrap-table2-editor.min.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"
88
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["react", "es2015", "stage-0", ["env", {"modules": false} ]]
3+
}

packages/react-bootstrap-table2-example/.storybook/webpack.config.js

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const path = require('path');
22

3-
const sourcePath = path.join(__dirname, '../../react-bootstrap-table2/src');
4-
const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/src');
5-
const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay/src');
6-
const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter/src');
7-
const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor/src');
3+
const sourcePath = path.join(__dirname, '../../react-bootstrap-table2');
4+
const paginationSourcePath = path.join(__dirname, '../../react-bootstrap-table2-paginator');
5+
const overlaySourcePath = path.join(__dirname, '../../react-bootstrap-table2-overlay');
6+
const filterSourcePath = path.join(__dirname, '../../react-bootstrap-table2-filter');
7+
const editorSourcePath = path.join(__dirname, '../../react-bootstrap-table2-editor');
88
const sourceStylePath = path.join(__dirname, '../../react-bootstrap-table2/style');
99
const paginationStylePath = path.join(__dirname, '../../react-bootstrap-table2-paginator/style');
1010
const storyPath = path.join(__dirname, '../stories');
@@ -16,6 +16,12 @@ const aliasPath = {
1616
src: srcPath,
1717
components: path.join(srcPath, 'components'),
1818
utils: path.join(srcPath, 'utils'),
19+
20+
'react-bootstrap-table2': sourcePath,
21+
'react-bootstrap-table2-editor': editorSourcePath,
22+
'react-bootstrap-table2-filter': filterSourcePath,
23+
'react-bootstrap-table2-overlay': overlaySourcePath,
24+
'react-bootstrap-table2-paginator': paginationSourcePath,
1925
};
2026

2127
const loaders = [{
@@ -28,7 +34,7 @@ const loaders = [{
2834
test: /\.js?$/,
2935
use: ['babel-loader'],
3036
exclude: /node_modules/,
31-
include: [sourcePath, paginationSourcePath, overlaySourcePath, filterSourcePath, editorSourcePath, storyPath],
37+
include: [sourcePath, paginationSourcePath, overlaySourcePath, filterSourcePath, editorSourcePath, storyPath]
3238
}, {
3339
test: /\.css$/,
3440
use: ['style-loader', 'css-loader'],

packages/react-bootstrap-table2-example/package.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@
1818
"react-dom": "^15.0.0"
1919
},
2020
"dependencies": {
21-
"bootstrap": "^3.3.7",
22-
"react-bootstrap-table2": "0.0.1",
23-
"react-bootstrap-table2-editor": "0.0.1",
24-
"react-bootstrap-table2-paginator": "0.0.1",
25-
"react-bootstrap-table2-overlay": "0.0.1",
26-
"react-bootstrap-table2-filter": "0.0.1"
21+
"bootstrap": "^3.3.7"
2722
},
2823
"devDependencies": {
2924
"@storybook/addon-console": "^1.0.0",
3025
"@storybook/react": "^3.2.8",
26+
"babel-preset-env": "^1.6.1",
3127
"react-redux": "^5.0.6",
3228
"redux": "^3.7.2",
3329
"redux-thunk": "^2.2.0",

packages/react-bootstrap-table2-filter/src/index.js packages/react-bootstrap-table2-filter/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import TextFilter from './components/text';
2-
import wrapperFactory from './wrapper';
3-
import * as Comparison from './comparison';
1+
import TextFilter from './src/components/text';
2+
import wrapperFactory from './src/wrapper';
3+
import * as Comparison from './src/comparison';
44

55
export default (options = {}) => ({
66
wrapperFactory,

packages/react-bootstrap-table2-filter/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-bootstrap-table2-filter",
33
"version": "0.0.1",
44
"description": "it's the column filter addon for react-bootstrap-table2",
5-
"main": "./lib",
5+
"main": "./dist/react-bootstrap-table2-filter.min.js",
66
"author": "",
77
"license": "ISC"
88
}

packages/react-bootstrap-table2-overlay/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-bootstrap-table2-overlay",
33
"version": "0.0.1",
44
"description": "it's a loading overlay component for react-bootstrap-table2",
5-
"main": "./lib",
5+
"main": "./dist/react-bootstrap-table2-overlay.min.js",
66
"author": "",
77
"license": "ISC",
88
"dependencies": {

packages/react-bootstrap-table2-paginator/src/index.js packages/react-bootstrap-table2-paginator/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import wrapperFactory from './wrapper';
1+
import wrapperFactory from './src/wrapper';
22

33
export default (options = {}) => ({
44
wrapperFactory,

packages/react-bootstrap-table2-paginator/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-bootstrap-table2-paginator",
33
"version": "0.0.1",
44
"description": "it's the pagination addon for react-bootstrap-table2",
5-
"main": "./lib",
5+
"main": "./dist/react-bootstrap-table2-paginator.min.js",
66
"author": "",
77
"license": "ISC"
88
}
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import BootstrapTable from './src/bootstrap-table';
2+
import withDataStore from './src/container';
3+
4+
export default withDataStore(BootstrapTable);
5+

packages/react-bootstrap-table2/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-bootstrap-table2",
33
"version": "0.0.1",
44
"description": "Rebuilt for react-bootstrap-table",
5-
"main": "./lib",
5+
"main": "./dist/react-bootstrap-table2.min.js",
66
"author": "",
77
"license": "ISC"
88
}

packages/react-bootstrap-table2/src/index.js

-5
This file was deleted.

0 commit comments

Comments
 (0)