Skip to content

Commit 16519f1

Browse files
update deps + rollup and webpack config
1 parent 5f056c2 commit 16519f1

12 files changed

+12708
-29237
lines changed

package-lock.json

Lines changed: 8194 additions & 23695 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"build:dist": "rollup -c",
2727
"build:lib:cjs": "cross-env BABEL_OUTPUT=cjs babel src/ --out-dir lib/cjs/ --ignore **/__tests__,**/__mocks__,**/*.test.js,**/*.js.snap",
2828
"build:lib:esm": "babel src/ --out-dir lib/esm/ --ignore **/__tests__,**/__mocks__,**/*.test.js,**/*.js.snap",
29-
"build:lib:esm-pf": "cross-env INCLUDE_POLYFILLS=true babel src/ --out-dir lib/esm-including-polyfills/ --ignore **/__tests__,**/__mocks__,**/*.test.js,**/*.js.snap",
3029
"build:scss:dev": "sass themes/scss:themes style/scss:style --no-source-map",
3130
"build:scss:pro": "sass themes/minified-scss:themes style/minified-scss:style --style compressed --no-source-map",
3231
"clean:lib": "rimraf lib",
@@ -41,38 +40,42 @@
4140
"react-dom": ">=16.8.0"
4241
},
4342
"devDependencies": {
44-
"@babel/cli": "^7.13.14",
45-
"@babel/core": "^7.11.4",
46-
"@babel/eslint-parser": "^7.14.4",
47-
"@babel/plugin-transform-react-jsx": "^7.10.4",
48-
"@babel/plugin-transform-react-jsx-self": "^7.10.4",
49-
"@babel/plugin-transform-runtime": "^7.13.10",
50-
"@babel/preset-env": "^7.11.0",
51-
"@babel/preset-react": "^7.10.4",
52-
"@rollup/plugin-commonjs": "^18.0.0",
53-
"@rollup/plugin-node-resolve": "^13.1.3",
54-
"babel-loader": "^8.1.0",
55-
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
43+
"@babel/cli": "^7.24.7",
44+
"@babel/core": "^7.24.7",
45+
"@babel/eslint-parser": "^7.24.7",
46+
"@babel/plugin-transform-runtime": "^7.24.7",
47+
"@babel/preset-env": "^7.24.7",
48+
"@babel/runtime-corejs3": "^7.24.7",
49+
"@rollup/plugin-commonjs": "^26.0.1",
50+
"@rollup/plugin-node-resolve": "^15.2.3",
51+
"@rollup/plugin-terser": "^0.4.4",
52+
"babel-loader": "^9.1.3",
5653
"cross-env": "^7.0.3",
57-
"css-loader": "^4.3.0",
58-
"eslint": "^7.27.0",
59-
"eslint-config-prettier": "^8.3.0",
60-
"eslint-plugin-prettier": "^3.4.0",
61-
"eslint-plugin-react": "^7.24.0",
62-
"gh-pages": "^3.2.3",
63-
"jest": "^26.6.3",
64-
"jest-extended": "^0.11.5",
54+
"element-resize-detector": "^1.2.4",
55+
"eslint": "^8.0.0",
56+
"eslint-config-prettier": "^9.1.0",
57+
"eslint-plugin-prettier": "^5.1.3",
58+
"gh-pages": "^6.1.1",
59+
"jest": "^29.7.0",
60+
"jest-environment-jsdom": "^29.7.0",
61+
"jest-extended": "^4.0.2",
62+
"lint-staged": "^15.2.7",
6563
"npm-run-all": "^4.1.5",
66-
"prettier": "2.3.0",
64+
"prettier": "3.3.2",
65+
"rollup": "^4.18.0",
66+
"webpack": "^5.92.1",
67+
"webpack-cli": "^5.1.4",
68+
"@babel/plugin-transform-react-jsx": "^7.24.7",
69+
"@babel/plugin-transform-react-jsx-self": "^7.24.7",
70+
"@babel/preset-react": "^7.24.7",
71+
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
72+
"css-loader": "^7.1.2",
73+
"eslint-plugin-react": "^7.34.3",
6774
"react": "16.9.0",
6875
"react-dom": "16.9.0",
6976
"react-test-renderer": "16.9.0",
70-
"rollup": "^2.41.0",
71-
"rollup-plugin-terser": "7.0.2",
72-
"sass": "^1.35.2",
73-
"style-loader": "^1.2.1",
74-
"webpack": "^4.44.1",
75-
"webpack-cli": "^3.3.12"
77+
"sass": "^1.77.6",
78+
"style-loader": "^4.0.0"
7679
},
7780
"files": [
7881
"plugins",
@@ -127,6 +130,7 @@
127130
"sideEffects": false,
128131
"dependencies": {
129132
"@popperjs/core": "^2.11.8",
133+
"@rollup/plugin-terser": "^0.4.4",
130134
"element-resize-detector": "^1.2.4",
131135
"prop-types": "^15.7.2",
132136
"tabs-more-button": "^1.0.1"

rollup.config.js

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import {terser} from 'rollup-plugin-terser';
2-
import commonjs from '@rollup/plugin-commonjs';
3-
import nodeResolve from '@rollup/plugin-node-resolve';
4-
const Config = ({en, inputPath = '', outputFile = 'rc-dyn-tabs-core', outputName = 'useDynTabs', pf = false}) => {
1+
// import {terser} from 'rollup-plugin-terser';
2+
// import commonjs from '@rollup/plugin-commonjs';
3+
// import nodeResolve from '@rollup/plugin-node-resolve';
4+
const terser = require('@rollup/plugin-terser');
5+
const commonjs = require('@rollup/plugin-commonjs');
6+
const nodeResolve = require('@rollup/plugin-node-resolve');
7+
const pkg = require('./package.json');
8+
const Config = ({en, inputPath = '', outputFile = 'react-dyn-tabs', outputName = 'useDynTabs', pf = false}) => {
59
var pfName = pf ? '.including-polyfills' : '';
610
return {
711
input: `lib/${pf ? 'esm-including-polyfills' : 'esm'}/${inputPath}index.js`,
@@ -15,6 +19,16 @@ const Config = ({en, inputPath = '', outputFile = 'rc-dyn-tabs-core', outputName
1519
react: 'React',
1620
},
1721
sourcemap: true,
22+
banner:
23+
'' +
24+
`/**
25+
* ${pkg.name} - ${pkg.description}
26+
*
27+
* @version v${pkg.version}
28+
* @homepage ${pkg.homepage}
29+
* @author ${pkg.author.name} ${pkg.author.email}
30+
* @license ${pkg.license}
31+
*/`,
1832
},
1933
plugins: (function () {
2034
const _plugins = [nodeResolve({preferBuiltins: false}), commonjs()];
@@ -28,13 +42,8 @@ const Config = ({en, inputPath = '', outputFile = 'rc-dyn-tabs-core', outputName
2842
},
2943
};
3044
},
31-
ConfigFactory = (op) => [
32-
Config({en: 'dev', ...op}),
33-
Config({en: 'prod', ...op}),
34-
Config({en: 'dev', pf: true, ...op}),
35-
Config({en: 'prod', pf: true, ...op}),
36-
];
37-
export default ConfigFactory().concat(
45+
ConfigFactory = (op) => [Config({en: 'dev', ...op}), Config({en: 'prod', ...op})];
46+
module.exports = ConfigFactory().concat(
3847
ConfigFactory({
3948
outputFile: 'more-button-plugin',
4049
outputName: 'MoreButtonPlugin',

style/react-dyn-tabs-rtl.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

style/react-dyn-tabs.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
z-index: 2;
124124
overflow-y: auto;
125125
height: auto;
126-
box-shadow: white 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
126+
box-shadow: rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
127127
}
128128

129129
.rc-dyn-tabs-tablist-view.rc-dyn-tabs-vertical {

style/react-dyn-tabs.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/react-dyn-tabs-basic.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/react-dyn-tabs-bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)