Skip to content

Commit 4bd7305

Browse files
committed
babel build
1 parent ec705f2 commit 4bd7305

File tree

9 files changed

+1135
-29
lines changed

9 files changed

+1135
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ yarn-error.log*
2020
storybook-static
2121

2222
# build
23+
lib
2324
dist

gulpfile.babel.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import gulp from 'gulp';
2+
import babel from 'gulp-babel';
3+
import rimraf from 'rimraf';
4+
import * as path from 'path';
5+
6+
7+
gulp.task('default', ['prod']);
8+
9+
gulp.task('clean', () => {
10+
[
11+
path.join(__dirname, 'packages/react-bootstrap-table2/lib'),
12+
path.join(__dirname, 'packages/react-bootstrap-table2-editor/lib'),
13+
path.join(__dirname, 'packages/react-bootstrap-table2-filter/lib'),
14+
path.join(__dirname, 'packages/react-bootstrap-table2-overlay/lib'),
15+
path.join(__dirname, 'packages/react-bootstrap-table2-paginator/lib')
16+
].forEach((dir) => {
17+
rimraf.sync(dir);
18+
});
19+
});
20+
21+
gulp.task('prod', ['clean'], () => {
22+
[
23+
'react-bootstrap-table2',
24+
'react-bootstrap-table2-editor',
25+
'react-bootstrap-table2-filter',
26+
'react-bootstrap-table2-overlay',
27+
'react-bootstrap-table2-paginator'
28+
].forEach((pkg) => {
29+
gulp.src([
30+
`./packages/${pkg}/**/*.js`,
31+
`!packages/${pkg}/+(test|dist|node_modules)/**/*.js`
32+
])
33+
.pipe(babel())
34+
.pipe(gulp.dest(`./packages/${pkg}/lib`));
35+
});
36+
});

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"postinstall": "lerna bootstrap",
88
"publish": "lerna run build && lerna publish --silent",
9-
"build": "node -r babel-register build.js",
9+
"build": "node -r babel-register build.js && ./node_modules/.bin/gulp prod",
1010
"start": "node -r babel-register ./node_modules/.bin/webpack-dev-server --config webpack.config.babel.js",
1111
"lint": "eslint ./packages --ext .js --ext .jsx --ignore-path .gitignore",
1212
"pretest": "yarn lint --cache",
@@ -46,6 +46,8 @@
4646
"eslint-plugin-import": "2.7.0",
4747
"eslint-plugin-jsx-a11y": "5.1.1",
4848
"eslint-plugin-react": "7.2.1",
49+
"gulp": "3.9.1",
50+
"gulp-babel": "7.0.0",
4951
"html-webpack-plugin": "2.30.1",
5052
"jest": "20.0.4",
5153
"jsdom": "11.2.0",

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

Lines changed: 1 addition & 1 deletion
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": "./dist/react-bootstrap-table2-editor.min.js",
5+
"main": "./lib/index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"
88
},

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

Lines changed: 1 addition & 1 deletion
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": "./dist/react-bootstrap-table2-filter.min.js",
5+
"main": "./lib/index.js",
66
"author": "",
77
"license": "ISC"
88
}

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

Lines changed: 1 addition & 1 deletion
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": "./dist/react-bootstrap-table2-overlay.min.js",
5+
"main": "./lib/index.js",
66
"author": "",
77
"license": "ISC",
88
"dependencies": {

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

Lines changed: 1 addition & 1 deletion
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": "./dist/react-bootstrap-table2-paginator.min.js",
5+
"main": "./lib/index.js",
66
"author": "",
77
"license": "ISC"
88
}

packages/react-bootstrap-table2/package.json

Lines changed: 1 addition & 1 deletion
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": "./dist/react-bootstrap-table2.min.js",
5+
"main": "./lib/index.js",
66
"author": "",
77
"license": "ISC"
88
}

0 commit comments

Comments
 (0)