diff --git a/gulpfile.babel.js b/gulpfile.babel.js index f202fda..228bfa3 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -17,7 +17,8 @@ const JS_PKGS = [ 'react-bootstrap-table2-editor', 'react-bootstrap-table2-filter', 'react-bootstrap-table2-overlay', - 'react-bootstrap-table2-paginator' + 'react-bootstrap-table2-paginator', + 'react-bootstrap-table2-toolkit' ].reduce((pkg, curr) => `${curr}|${pkg}`, ''); const JS_SKIPS = `+(${TEST}|${LIB}|${DIST}|${NODE_MODULES})`; @@ -78,7 +79,8 @@ function umd(done) { () => gulp.src('./webpack/editor.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])), () => gulp.src('./webpack/filter.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])), () => gulp.src('./webpack/overlay.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])), - () => gulp.src('./webpack/paginator.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])) + () => gulp.src('./webpack/paginator.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])), + () => gulp.src('./webpack/toolkit.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])) )(); done(); } diff --git a/packages/react-bootstrap-table2-toolkit/package.json b/packages/react-bootstrap-table2-toolkit/package.json index 297d2c2..efdbc64 100644 --- a/packages/react-bootstrap-table2-toolkit/package.json +++ b/packages/react-bootstrap-table2-toolkit/package.json @@ -10,6 +10,13 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, + "files": [ + "lib/", + "dist/" + ], + "tags": [ + "react" + ], "author": "AllenFang", "license": "MIT", "keywords": [ diff --git a/webpack/toolkit.umd.babel.js b/webpack/toolkit.umd.babel.js new file mode 100644 index 0000000..677eacc --- /dev/null +++ b/webpack/toolkit.umd.babel.js @@ -0,0 +1,16 @@ +import * as path from 'path'; +import umdConfig from './webpack.umd.babel'; + +module.exports = { + ...umdConfig, + entry: { + 'react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit': './packages/react-bootstrap-table2-toolkit/index.js', + 'react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.min': './packages/react-bootstrap-table2-toolkit/index.js' + }, + output: { + path: path.join(__dirname, '../packages'), + filename: '[name].js', + library: 'ReactBootstrapTable2Toolkit', + libraryTarget: 'umd' + } +};