prepare builds for react-bootstrap-table2-toolkit

This commit is contained in:
AllenFang 2018-06-23 15:10:00 +08:00
parent 18b785d655
commit 46f0ce493b
3 changed files with 27 additions and 2 deletions

View File

@ -17,7 +17,8 @@ const JS_PKGS = [
'react-bootstrap-table2-editor', 'react-bootstrap-table2-editor',
'react-bootstrap-table2-filter', 'react-bootstrap-table2-filter',
'react-bootstrap-table2-overlay', 'react-bootstrap-table2-overlay',
'react-bootstrap-table2-paginator' 'react-bootstrap-table2-paginator',
'react-bootstrap-table2-toolkit'
].reduce((pkg, curr) => `${curr}|${pkg}`, ''); ].reduce((pkg, curr) => `${curr}|${pkg}`, '');
const JS_SKIPS = `+(${TEST}|${LIB}|${DIST}|${NODE_MODULES})`; 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/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/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/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(); done();
} }

View File

@ -10,6 +10,13 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"files": [
"lib/",
"dist/"
],
"tags": [
"react"
],
"author": "AllenFang", "author": "AllenFang",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@ -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'
}
};