Skip to content

Commit ecb5d6e

Browse files
committed
Merge branch 'master' into v2.0-dev
2 parents 829fc28 + c9bfe82 commit ecb5d6e

File tree

4 files changed

+16
-25
lines changed

4 files changed

+16
-25
lines changed

examples/src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
1010
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css">
1111
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Roboto">
12-
<link rel="stylesheet" href="style.css">
12+
<link rel="stylesheet" href="./scss/style.scss">
1313

1414
<!-- Google tag (gtag.js) -->
1515
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JEEPG1KXFR"></script>
@@ -107,6 +107,6 @@ <h2>Filter Example</h2>
107107
</footer>
108108
</section>
109109

110-
<script src="index.js"></script>
110+
<script src="./index.jsx"></script>
111111
</body>
112112
</html>

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@
6565
"eslint-plugin-react": "^7.10.0",
6666
"eslint-plugin-react-hooks": "^4.2.0",
6767
"global-jsdom": "^8.6.0",
68-
"html-webpack-plugin": "^5.5.0",
68+
"html-bundler-webpack-plugin": "^1.6.5",
6969
"jsdom": "^21.0.0",
7070
"less": "^4.1.3",
71-
"mini-css-extract-plugin": "^2.7.2",
7271
"mocha": "^10.0.0",
7372
"postcss": "^8.4.21",
7473
"postcss-cli": "^10.1.0",
@@ -81,7 +80,6 @@
8180
"webpack": "^5.3.2",
8281
"webpack-cli": "^5.0.1",
8382
"webpack-dev-server": "^4.11.1",
84-
"webpack-remove-empty-scripts": "^1.0.1",
8583
"webpack-stream": "^7.0.0"
8684
},
8785
"dependencies": {

src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ declare module "react-checkbox-tree" {
4343
interface CheckboxProps {
4444
nodes: Array<Node>;
4545

46-
checkModel?: string;
46+
checkModel?: 'leaf' | 'all';
4747
checked?: Array<string>;
48-
direction?: string;
48+
direction?: 'ltr' | 'rtl';
4949
disabled?: boolean;
5050
expandDisabled?: boolean;
5151
expandOnClick?: boolean;

webpack.config.test.js

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
const HtmlWebpackPlugin = require('html-webpack-plugin');
1+
const HtmlBundlerPlugin = require('html-bundler-webpack-plugin');
22
const path = require('node:path');
3-
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4-
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
53

64
module.exports = {
75
mode: 'development',
8-
entry: {
9-
index: path.join(__dirname, 'examples/src/index.jsx'),
10-
style: path.join(__dirname, 'examples/src/scss/style.scss'),
11-
},
126
output: {
137
path: path.join(__dirname, 'examples/dist'),
14-
filename: '[name].js',
158
library: {
169
name: 'ReactCheckboxTree',
1710
type: 'umd',
@@ -33,7 +26,6 @@ module.exports = {
3326
{
3427
test: /\.s[ac]ss$/i,
3528
use: [
36-
MiniCssExtractPlugin.loader,
3729
'css-loader',
3830
'sass-loader',
3931
],
@@ -48,15 +40,16 @@ module.exports = {
4840
watchFiles: ['src/**/*', 'examples/src/**/*'],
4941
},
5042
plugins: [
51-
new RemoveEmptyScriptsPlugin({}),
52-
new MiniCssExtractPlugin({
53-
filename: '[name].css',
54-
}),
55-
new HtmlWebpackPlugin({
56-
template: 'examples/src/index.html',
57-
filename: 'index.html',
58-
inject: false,
59-
minify: false,
43+
new HtmlBundlerPlugin({
44+
entry: {
45+
index: 'examples/src/index.html',
46+
},
47+
js: {
48+
filename: '[name].[contenthash:8].js',
49+
},
50+
css: {
51+
filename: '[name].[contenthash:8].css',
52+
},
6053
}),
6154
],
6255
};

0 commit comments

Comments
 (0)