@dg-scripts/webpack-template 0.0.0-1867

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.babelrc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "presets": ["@babel/env"],
3
+ "plugins": [
4
+ "@babel/transform-object-rest-spread",
5
+ "@babel/transform-class-properties"
6
+ ]
7
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "arrowParens": "avoid",
3
+ "endOfLine": "lf",
4
+ "semi": false,
5
+ "singleQuote": true,
6
+ "tabWidth": 2,
7
+ "trailingComma": "es5",
8
+ "printWidth": 80
9
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "@dg-scripts/stylelint-config"
3
+ }
package/.test.env ADDED
@@ -0,0 +1 @@
1
+ NODE_ENV=test
package/CHANGELOG.md ADDED
@@ -0,0 +1,349 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [0.0.0-1867](https://github.com/sabertazimi/bod/compare/v5.17.0...v0.0.0-1867) (2024-03-31)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **bod-tempalte:** add webpack tempalte directory ([#1143](https://github.com/sabertazimi/bod/issues/1143)) ([f212277](https://github.com/sabertazimi/bod/commit/f212277afa68c1c88e30124337887cd2a6e136ef))
11
+
12
+ ### Features
13
+
14
+ - **bod-template:** add webpack template ([#1144](https://github.com/sabertazimi/bod/issues/1144)) ([e1c1efd](https://github.com/sabertazimi/bod/commit/e1c1efda93b58db8fec18a5c32b7cb13a09fa62b))
15
+
16
+ # [2.10.0](https://github.com/sabertazimi/boilerplate/compare/v2.9.0...v2.10.0) (2022-05-29)
17
+
18
+ ### :rocket: Building Work
19
+
20
+ - **deps-bot:** disable lockfile maintenance ([7ec6de5](https://github.com/sabertazimi/boilerplate/commit/7ec6de58bae442b106536388739ba0d54b8d44e8))
21
+
22
+ ### :bug: Bug Fixes
23
+
24
+ - **jest-config:** rectify jest utils path ([7a20864](https://github.com/sabertazimi/boilerplate/commit/7a20864df7b9a19d77a4de83f8d90c82f4235922))
25
+ - webpack noise printed only if error or warning ([#349](https://github.com/sabertazimi/boilerplate/issues/349)) ([f2b8571](https://github.com/sabertazimi/boilerplate/commit/f2b857117ed394034889be231635aa8e4184693e))
26
+ - **webpack-svgr:** update svgo configuration for v6 ([43224c2](https://github.com/sabertazimi/boilerplate/commit/43224c22270519e4c8d9672a630efe4cf02b01a6))
27
+
28
+ ### :sparkles: Features
29
+
30
+ - **postcss:** add support for postcss presets ([#376](https://github.com/sabertazimi/boilerplate/issues/376)) ([2110fb6](https://github.com/sabertazimi/boilerplate/commit/2110fb635474dd38654907fe9bff8307b417eef9))
31
+
32
+ # [2.9.0](https://github.com/sabertazimi/boilerplate/compare/v2.8.0...v2.9.0) (2021-10-27)
33
+
34
+ ### :bug: Bug Fixes
35
+
36
+ - **deps:** bump `dg-scripts/*` to 5.5.0 ([c006367](https://github.com/sabertazimi/boilerplate/commit/c006367dcc8022c1525f956c7517dba48fefbbc6))
37
+ - **deps:** bump eslint to v8 ([369c46c](https://github.com/sabertazimi/boilerplate/commit/369c46c1f5b61118babc654db2b556b100a427a2))
38
+ - **deps:** bump linter configuration to 5.5.3 ([f0f9781](https://github.com/sabertazimi/boilerplate/commit/f0f978185e7308e8d8a55c39c5e6de75fedaf053))
39
+
40
+ ### :rocket: Building Work
41
+
42
+ - **deps-bot:** remove GitHub dependabot ([263fea6](https://github.com/sabertazimi/boilerplate/commit/263fea6e8ccd806484bad15b197cfcdd773f3734))
43
+ - **deps-dev:** bump `@dg-scripts/*` to 1.1.1 ([6740697](https://github.com/sabertazimi/boilerplate/commit/674069747c8d3b2bafc069ca0475819f9ffe3a08))
44
+ - **deps:** bundle bod deps into single PR ([daaf06a](https://github.com/sabertazimi/boilerplate/commit/daaf06afd436dbaa44ee2ebb2ebf8c8e913388e6))
45
+ - **lint:** disable auto-fix for linter ([df24f40](https://github.com/sabertazimi/boilerplate/commit/df24f40088cb38eae8a3ad91030c8f77916246c5))
46
+ - **yarn:** bump yarn from v3.0.2 to v3.1.0 ([348211b](https://github.com/sabertazimi/boilerplate/commit/348211b810650de13f4d6e8c8db911ea96355e4b))
47
+
48
+ ### :sparkles: Features
49
+
50
+ - **sass:** ship to `dart-sass`, drop `node-sass` ([1e4294a](https://github.com/sabertazimi/boilerplate/commit/1e4294a9532945ab665654cb9845f0c13928d135))
51
+
52
+ # [2.8.0](https://github.com/sabertazimi/boilerplate/compare/v2.7.1...v2.8.0) (2021-09-23)
53
+
54
+ ### :bug: Bug Fixes
55
+
56
+ - **template-test:** remove conditional expect statement ([70ce24a](https://github.com/sabertazimi/boilerplate/commit/70ce24ac911ea43da75f6557ada0dc7f627b8c59))
57
+
58
+ ### :sparkles: Features
59
+
60
+ - **linter:** add `[@dg-scripts](https://github.com/dg-scripts)` linter configuration ([475c01a](https://github.com/sabertazimi/boilerplate/commit/475c01a09eea476e0b1f8c9d9b8bc44e0e2d3ac9))
61
+
62
+ ### :rocket: Building Work
63
+
64
+ - **CI:** add multiple environment for building ([c17a176](https://github.com/sabertazimi/boilerplate/commit/c17a17625942cdf57872c28a03e57fe165ed90a0))
65
+ - **CI:** add multiple environment for testing ([544e6ec](https://github.com/sabertazimi/boilerplate/commit/544e6ec853db1b206c85e8076ac98d2ecae3d1e4))
66
+ - **CI:** switch `coveralls` to `codecov` ([af04e9b](https://github.com/sabertazimi/boilerplate/commit/af04e9b4c102fcfbca2b52fbed7826130e7a2fed))
67
+ - **deps-bot:** change PR concurrent limits ([bc18455](https://github.com/sabertazimi/boilerplate/commit/bc184557bbc7c019c3105d10109d631bdf179e91))
68
+ - **deps-bot:** enable non-major deps automerge ([b70d62e](https://github.com/sabertazimi/boilerplate/commit/b70d62e0e29479e71bfe3079a7ece401f94a5a21))
69
+ - **deps-bot:** setup renovate bot configuration ([88fb53f](https://github.com/sabertazimi/boilerplate/commit/88fb53f059edaecd9d9c5a53954fd68fd1c8c327))
70
+ - **deps-bot:** widen peerDeps and engines ([e427f47](https://github.com/sabertazimi/boilerplate/commit/e427f47b3dd951a430e2bcbe4452e336389b20d1))
71
+ - **deps-dev:** bump `[@dg-scripts](https://github.com/dg-scripts)` to latest version ([7441aa4](https://github.com/sabertazimi/boilerplate/commit/7441aa4983804836a0ba3fbfa72e34d219a2f2e3))
72
+
73
+ ## [2.7.1](https://github.com/sabertazimi/boilerplate/compare/v2.7.0...v2.7.1) (2021-09-12)
74
+
75
+ ### :wrench: Testing
76
+
77
+ - **template-Particle:** add mocks for canvas function ([757b3ed](https://github.com/sabertazimi/boilerplate/commit/757b3ed95d9b6d59b4dac6df2f26e199507bf219))
78
+
79
+ ### :bug: Bug Fixes
80
+
81
+ - **template-canvas:** save context before new draw ([a92e2e4](https://github.com/sabertazimi/boilerplate/commit/a92e2e40ce63658d08efc9119809eddc1b5c7963))
82
+ - **tsconfig:** exclude testing files ([f09e986](https://github.com/sabertazimi/boilerplate/commit/f09e986955352c97176cde18bed5bfcf516a8e93))
83
+ - **webpack-profile:** disable ugly functions when profiling ([b9b471d](https://github.com/sabertazimi/boilerplate/commit/b9b471d465bdc896f9e81c41dcaf9af1892f3323))
84
+ - **webpack:** add `devServer` types for VSCode intellisense ([8a2be17](https://github.com/sabertazimi/boilerplate/commit/8a2be171b7e304d82cbea3fed068b128af414c47))
85
+ - **webpack:** setup `mode` and `devServer` configuration ([37f6608](https://github.com/sabertazimi/boilerplate/commit/37f660839908d1a4a2c7f94be62ef6aa79133eda))
86
+
87
+ ### :rocket: Building Work
88
+
89
+ - **CI-CodeQL:** add CodeQL analysis ([8184f16](https://github.com/sabertazimi/boilerplate/commit/8184f1618c7a6cc6db7fbc0238810141a95e6297))
90
+ - **deps-bot:** add renovate.json ([#98](https://github.com/sabertazimi/boilerplate/issues/98)) ([e39d59d](https://github.com/sabertazimi/boilerplate/commit/e39d59dea41dd0ba40b662bf65c1984f1cee9839))
91
+ - **deps-bot:** setup renovate bot configuration ([c49b38a](https://github.com/sabertazimi/boilerplate/commit/c49b38a3be2cab730d1e21da3ea809b004113feb))
92
+ - **deps:** add missing peer deps ([6d00148](https://github.com/sabertazimi/boilerplate/commit/6d00148cff47d71c58ad2db3437b44fc55963191))
93
+ - **scripts:** rectify stylelint path matching ([5672c6b](https://github.com/sabertazimi/boilerplate/commit/5672c6b0edfd4859dae069aaa628fa8ceaf1db24))
94
+ - **yarn:** ship to yarn berry ([e925cf1](https://github.com/sabertazimi/boilerplate/commit/e925cf1f1504cbc01fc436c098d78e386c72ca96))
95
+
96
+ # [2.7.0](https://github.com/sabertazimi/boilerplate/compare/v2.6.0...v2.7.0) (2021-09-06)
97
+
98
+ ### :bug: Bug Fixes
99
+
100
+ - **TypeScript-types:** add more third party types ([0b628fa](https://github.com/sabertazimi/boilerplate/commit/0b628fa7829db5d2867eba11ed790aee30ccf01a))
101
+ - **webpack-split chunks:** improve split chunks configuration ([d76d2a3](https://github.com/sabertazimi/boilerplate/commit/d76d2a332d97303c0dbf27716b9f72960279801e))
102
+ - **webpack:** disable production source map ([525e803](https://github.com/sabertazimi/boilerplate/commit/525e803c296a24ea130a7c9b9bb7da1b8ff68f72))
103
+
104
+ ### :rocket: Building Work
105
+
106
+ - **deps-dev:** bump @babel/core from 7.15.0 to 7.15.5 ([#93](https://github.com/sabertazimi/boilerplate/issues/93)) ([a95abae](https://github.com/sabertazimi/boilerplate/commit/a95abaef775494b986b18b9297c0dad9c21626d8))
107
+ - **deps-dev:** bump @babel/preset-env from 7.15.0 to 7.15.4 ([#89](https://github.com/sabertazimi/boilerplate/issues/89)) ([cdfe25c](https://github.com/sabertazimi/boilerplate/commit/cdfe25c748cf42b45bac7090123be30921cef58e))
108
+ - **deps-dev:** bump @types/node from 16.7.9 to 16.7.10 ([#95](https://github.com/sabertazimi/boilerplate/issues/95)) ([a71efa7](https://github.com/sabertazimi/boilerplate/commit/a71efa7a3b0e9626eb10069952d49ccc97ad6257))
109
+ - **deps-dev:** bump autoprefixer from 10.3.3 to 10.3.4 ([#92](https://github.com/sabertazimi/boilerplate/issues/92)) ([9103de6](https://github.com/sabertazimi/boilerplate/commit/9103de60e9be8f60fc6feaeaf2c6e6778e9e7859))
110
+ - **deps-dev:** bump clean-webpack-plugin from 3.0.0 to 4.0.0 ([#90](https://github.com/sabertazimi/boilerplate/issues/90)) ([7b5f704](https://github.com/sabertazimi/boilerplate/commit/7b5f704ed6b12a673fc1c2cdf9467a1baa16a78e))
111
+ - **deps-dev:** bump mini-css-extract-plugin from 2.2.1 to 2.2.2 ([#91](https://github.com/sabertazimi/boilerplate/issues/91)) ([0b761da](https://github.com/sabertazimi/boilerplate/commit/0b761da515cbaffd451d394033e5ea4c2aef28c4))
112
+ - **deps-dev:** bump stylelint-config-bod from 5.3.1 to 5.3.3 ([#96](https://github.com/sabertazimi/boilerplate/issues/96)) ([d3552ce](https://github.com/sabertazimi/boilerplate/commit/d3552cead3caa8edc320141bb94048c3e83b9951))
113
+ - **deps-dev:** bump webpack from 5.51.1 to 5.52.0 ([#97](https://github.com/sabertazimi/boilerplate/issues/97)) ([d35b2f1](https://github.com/sabertazimi/boilerplate/commit/d35b2f1065fd91ae98245c8f5db26f81bd210003))
114
+ - **Jest:** enable Jest config intellisense ([01f9140](https://github.com/sabertazimi/boilerplate/commit/01f9140e389f2e9c3e1c59c50afd855490a17b69))
115
+ - **webpack:** enable webpack config intellisense ([2bcb3aa](https://github.com/sabertazimi/boilerplate/commit/2bcb3aab2f12c0d2b00aae80bb9591f6c883f720))
116
+ - **webpack:** split `particle` into a single chunk ([d21c081](https://github.com/sabertazimi/boilerplate/commit/d21c08121d628b54f8f79123b50f9a621f5fb54a))
117
+
118
+ # [2.6.0](https://github.com/sabertazimi/boilerplate/compare/v2.5.0...v2.6.0) (2021-09-03)
119
+
120
+ ### :zap: Performance
121
+
122
+ - **webpack-output:** change `chunkhash` to `contenthash` ([9120c17](https://github.com/sabertazimi/boilerplate/commit/9120c17ddc8cd3c0a59e846532bd1516d10c3fa0))
123
+ - **webpack:** enable build cache ([ad0baa3](https://github.com/sabertazimi/boilerplate/commit/ad0baa365d6c2fce134e1e233b112ae2f890adb5))
124
+ - **webpack:** improve extension resolve performance ([12698c5](https://github.com/sabertazimi/boilerplate/commit/12698c5ab90958a8641bc7e5a5fee9841cbd2d17))
125
+
126
+ ### :sparkles: Features
127
+
128
+ - **stylelint:** setup complex stylelint configuration ([705182b](https://github.com/sabertazimi/boilerplate/commit/705182bb6dd57b7501b0cb65aeeb3d5da4e3bee0))
129
+ - **webpack-minimize:** add JS and CSS minimizer support ([1ec8a2e](https://github.com/sabertazimi/boilerplate/commit/1ec8a2ef63b79eac60b9ab423df5af86564ef8cc))
130
+ - **webpack-split chunks:** enable split vendor chunks ([88a4643](https://github.com/sabertazimi/boilerplate/commit/88a4643ab0ef073f58dbfe1be20a16e01183d194))
131
+ - **webpack:** enable hot module replacement ([5208d1f](https://github.com/sabertazimi/boilerplate/commit/5208d1f2df23b813a2f8affb0ccd0b2d6d61e98e))
132
+
133
+ ### :bug: Bug Fixes
134
+
135
+ - **css:** rectify rule order ([7be7869](https://github.com/sabertazimi/boilerplate/commit/7be786971919c2ff3fc80750b363af942b6ab673))
136
+
137
+ ### :rocket: Building Work
138
+
139
+ - **CI-badge:** move badge generation to `test` stage ([1c30035](https://github.com/sabertazimi/boilerplate/commit/1c300350c132c8413baf7e7dec784c7d55123c81))
140
+ - **CI:** separate CI stages ([aa7af27](https://github.com/sabertazimi/boilerplate/commit/aa7af27a85fd870318d3dfe0cb236ac35f67aaa0))
141
+ - **Jest-badge:** format code ([00cd3be](https://github.com/sabertazimi/boilerplate/commit/00cd3be8feb1c8aabc3236fd378b3e83a220af04))
142
+
143
+ # [2.5.0](https://github.com/sabertazimi/boilerplate/compare/v2.4.0...v2.5.0) (2021-09-03)
144
+
145
+ ### :rocket: Building Work
146
+
147
+ - **CI:** remove redundant artifacts stage ([d3a8898](https://github.com/sabertazimi/boilerplate/commit/d3a8898024cb3f5a13da283a3ef8e97fa9bc574f))
148
+
149
+ ### :sparkles: Features
150
+
151
+ - **css-modules:** enable css modules suuport ([5061aba](https://github.com/sabertazimi/boilerplate/commit/5061abaf4694d7a343870a7a85c97fca859df9d4))
152
+
153
+ ### :bug: Bug Fixes
154
+
155
+ - **devtool-source map:** change source map configuration ([d114a7e](https://github.com/sabertazimi/boilerplate/commit/d114a7ebccc4ec8a6bf1eeeb10383d18c073b3fa))
156
+
157
+ # [2.4.0](https://github.com/sabertazimi/boilerplate/compare/v2.3.0...v2.4.0) (2021-08-31)
158
+
159
+ ### :sparkles: Features
160
+
161
+ - **webpack-UI:** add elegant progressbar CLI UI ([a42ebb8](https://github.com/sabertazimi/boilerplate/commit/a42ebb89bbe2e1ad53e157a49d22a90e745b8164))
162
+
163
+ ### :rocket: Building Work
164
+
165
+ - **dependabot:** change versioning strategy to `increase` ([75fc549](https://github.com/sabertazimi/boilerplate/commit/75fc549a604ed8440f173c0090f9857ed688102f))
166
+ - **deps-dev:** bump @types/node from 16.6.2 to 16.7.1 ([44be075](https://github.com/sabertazimi/boilerplate/commit/44be0757e939652f52ccfe3bca63d899961df862))
167
+ - **deps-dev:** bump @types/node from 16.7.1 to 16.7.4 ([493e089](https://github.com/sabertazimi/boilerplate/commit/493e08925abe7ed675a618ed7a383fa49f42071e))
168
+ - **deps-dev:** bump @types/node from 16.7.4 to 16.7.6 ([1f648e4](https://github.com/sabertazimi/boilerplate/commit/1f648e4997fb9c65d63023004de651c24ded37dc))
169
+ - **deps-dev:** bump @types/node from 16.7.6 to 16.7.8 ([#83](https://github.com/sabertazimi/boilerplate/issues/83)) ([a0f55b3](https://github.com/sabertazimi/boilerplate/commit/a0f55b329d477de820ba7e7e009a401d98efab5a))
170
+ - **deps-dev:** bump @types/node from 16.7.8 to 16.7.9 ([#87](https://github.com/sabertazimi/boilerplate/issues/87)) ([b3b7f5a](https://github.com/sabertazimi/boilerplate/commit/b3b7f5a8a8820040315338a5750293eeb5d66637))
171
+ - **deps-dev:** bump @typescript-eslint/eslint-plugin ([9b2d2d5](https://github.com/sabertazimi/boilerplate/commit/9b2d2d59e62260cc001dd4f76d9d216f8310ea4e))
172
+ - **deps-dev:** bump @typescript-eslint/eslint-plugin ([#80](https://github.com/sabertazimi/boilerplate/issues/80)) ([7a4bc7b](https://github.com/sabertazimi/boilerplate/commit/7a4bc7b74916f9dee4b07bcd9ee49632cc30a4ad))
173
+ - **deps-dev:** bump @typescript-eslint/parser from 4.29.2 to 4.29.3 ([dd59e36](https://github.com/sabertazimi/boilerplate/commit/dd59e3618e40c80fcab37036c71ec878783f0004))
174
+ - **deps-dev:** bump @typescript-eslint/parser from 4.29.3 to 4.30.0 ([#82](https://github.com/sabertazimi/boilerplate/issues/82)) ([3748f96](https://github.com/sabertazimi/boilerplate/commit/3748f96e0b34ec8d926d0466a7ebe61f6a93d2c1))
175
+ - **deps-dev:** bump autoprefixer from 10.3.1 to 10.3.2 ([6ce5f1c](https://github.com/sabertazimi/boilerplate/commit/6ce5f1c873c57d4826b52d43d965d03a1878d5ca))
176
+ - **deps-dev:** bump autoprefixer from 10.3.2 to 10.3.3 ([261294d](https://github.com/sabertazimi/boilerplate/commit/261294de10202a22763221aabf6dc48bef99d78a))
177
+ - **deps-dev:** bump eslint-plugin-import from 2.24.0 to 2.24.1 ([b298b4a](https://github.com/sabertazimi/boilerplate/commit/b298b4a58e4a89d2eef6b6ebd5d9e150911a0171))
178
+ - **deps-dev:** bump eslint-plugin-import from 2.24.1 to 2.24.2 ([c267e1d](https://github.com/sabertazimi/boilerplate/commit/c267e1d7fea2c7922289a7d532f9ffd3dda4cc56))
179
+ - **deps-dev:** bump eslint-plugin-prettier from 3.4.0 to 3.4.1 ([01bfd14](https://github.com/sabertazimi/boilerplate/commit/01bfd14628a94b68421b52c639e1d97257070d9b))
180
+ - **deps-dev:** bump eslint-plugin-prettier from 3.4.1 to 4.0.0 ([#84](https://github.com/sabertazimi/boilerplate/issues/84)) ([d615b40](https://github.com/sabertazimi/boilerplate/commit/d615b4012097e1ce830aae23ad11dcfc42152dbf))
181
+ - **deps-dev:** bump eslint-plugin-react from 7.24.0 to 7.25.0 ([978f0de](https://github.com/sabertazimi/boilerplate/commit/978f0deb974d0fecb3f2d35f8f678c008cc1e249))
182
+ - **deps-dev:** bump eslint-plugin-react from 7.25.0 to 7.25.1 ([#81](https://github.com/sabertazimi/boilerplate/issues/81)) ([2da3954](https://github.com/sabertazimi/boilerplate/commit/2da3954bcf27b786a8d369e2d5ff77a6b6ba2e8e))
183
+ - **deps-dev:** bump jest from 27.0.6 to 27.1.0 ([d415264](https://github.com/sabertazimi/boilerplate/commit/d4152648a8a89534097ab76095e28631fa5a9d9b))
184
+ - **deps-dev:** bump mini-css-extract-plugin from 2.2.0 to 2.2.1 ([#86](https://github.com/sabertazimi/boilerplate/issues/86)) ([787d204](https://github.com/sabertazimi/boilerplate/commit/787d20429f12c0959ef37d039a54b91f124539f4))
185
+ - **deps-dev:** bump typescript from 4.3.5 to 4.4.2 ([870b653](https://github.com/sabertazimi/boilerplate/commit/870b6532d42b7f00402d30139f69b9927fbd83ac))
186
+ - **deps-dev:** bump webpack from 5.51.0 to 5.51.1 ([11bb681](https://github.com/sabertazimi/boilerplate/commit/11bb6816f002f7f89f99360138aa2c0b6866b07d))
187
+ - **deps-dev:** bump webpack-dev-server from 4.0.0 to 4.1.0 ([#85](https://github.com/sabertazimi/boilerplate/issues/85)) ([776f410](https://github.com/sabertazimi/boilerplate/commit/776f41078c310c9714305d3e930c4295c55a7a54))
188
+ - **Jest-badge:** rectify unknown error type in TS 4.4.0 ([115fc46](https://github.com/sabertazimi/boilerplate/commit/115fc464b148b33cae2029708fdde0d1ab674c67))
189
+
190
+ # [2.3.0](https://github.com/sabertazimi/boilerplate/compare/v2.2.0...v2.3.0) (2021-08-19)
191
+
192
+ ### :sparkles: Features
193
+
194
+ - **webpack:** add bundle analyzer support ([e708c1f](https://github.com/sabertazimi/boilerplate/commit/e708c1f8bba87056ea014e5a2c59613263361534))
195
+
196
+ # [2.2.0](https://github.com/sabertazimi/boilerplate/compare/v2.1.0...v2.2.0) (2021-08-19)
197
+
198
+ ### :bug: Bug Fixes
199
+
200
+ - **CHANGELOG:** add emoji to changelog ([98961b1](https://github.com/sabertazimi/boilerplate/commit/98961b12316e8d96f82ddebef8418b1dbbc08549))
201
+ - **Jest:** rectify deprecated `ts-jest` config ([e2b197a](https://github.com/sabertazimi/boilerplate/commit/e2b197abeb6d4874746bae9afc31ebba9f21dc02))
202
+
203
+ ### :rocket: Building Work
204
+
205
+ - **CI-azure:** add more pipeline triggers ([37e2ebe](https://github.com/sabertazimi/boilerplate/commit/37e2ebe873fd847efb102603ebc7ad1655a3daa2))
206
+ - **CI:** initialize git config ([f3d7ee6](https://github.com/sabertazimi/boilerplate/commit/f3d7ee6e2c085addc7b4db8e4c72dd246fc82c1a))
207
+ - **CI:** set up CI with Azure Pipelines ([7a98a8f](https://github.com/sabertazimi/boilerplate/commit/7a98a8f1c4b616c3d469897c260ef02420687c5e))
208
+ - **deps-dev:** bump @types/node from 16.6.1 to 16.6.2 ([e8192d5](https://github.com/sabertazimi/boilerplate/commit/e8192d589a8d1d6937c14751367d07203662e665))
209
+ - **deps-dev:** bump ts-jest from 27.0.4 to 27.0.5 ([722754c](https://github.com/sabertazimi/boilerplate/commit/722754cbf9b6d87508b8c044ac67094533d3c0a0))
210
+ - **deps-dev:** bump ts-node from 10.2.0 to 10.2.1 ([7a57323](https://github.com/sabertazimi/boilerplate/commit/7a573232cc2aefce50850df6e5b7740f578bb56b))
211
+ - **deps-dev:** bump webpack from 5.50.0 to 5.51.0 ([b42b5e7](https://github.com/sabertazimi/boilerplate/commit/b42b5e74ef769e5d682c145a460c50115d82482e))
212
+ - **deps-dev:** bump webpack-dev-server from 3.11.2 to 4.0.0 ([46fba74](https://github.com/sabertazimi/boilerplate/commit/46fba74a0a2bd9eb57f040d94e066cf32a177ef8))
213
+
214
+ ### :sparkles: Features
215
+
216
+ - **test-coverage:** add support for coveralls report ([d5f7758](https://github.com/sabertazimi/boilerplate/commit/d5f77584871809d1d271af8c4c1632ddab61556c))
217
+ - **webpack-assets:** process assets files with webpack assets module ([215afc1](https://github.com/sabertazimi/boilerplate/commit/215afc13d4b683b8cb4038ebbdfa7a9fe6aa4689))
218
+
219
+ # [2.1.0](https://github.com/sabertazimi/boilerplate/compare/v2.0.2...v2.1.0) (2021-08-17)
220
+
221
+ ### Features
222
+
223
+ - **TypeScript:** add ts-node for supporting TS scripts ([6110d90](https://github.com/sabertazimi/boilerplate/commit/6110d906f2195ffe53b655134f9bc9447629c0c3))
224
+
225
+ ### Bug Fixes
226
+
227
+ - **boilerplate-test:** move mock setup to before/after hook ([7911db7](https://github.com/sabertazimi/boilerplate/commit/7911db74d76a5d8cf80585ccc66b59173319796c))
228
+ - **deps-security:** bump url-parse from 1.5.1 to 1.5.3 ([bd57d6c](https://github.com/sabertazimi/boilerplate/commit/bd57d6c8deafc74c942c308500d26cadfdfb243a))
229
+ - **deps-types:** add missing node-fetch TS types ([94da0bf](https://github.com/sabertazimi/boilerplate/commit/94da0bff957c22f6f51e5dcb7815c74dc6e844a5))
230
+ - **Jest-badge:** rectify ts-node config ([4232ee6](https://github.com/sabertazimi/boilerplate/commit/4232ee65c6f24893924e952412de262236305979))
231
+ - **Jest-badge:** rewrite badge generation with TS ([07cc25a](https://github.com/sabertazimi/boilerplate/commit/07cc25ad859db51a3c6bf9aeec3346320419d842))
232
+
233
+ ### Testing
234
+
235
+ - **NODE_ENV:** set NODE_ENV to `test` ([2f2ca66](https://github.com/sabertazimi/boilerplate/commit/2f2ca66a790f07ec75de94901fdb1193205f2637))
236
+
237
+ ### Building Work
238
+
239
+ - **CI:** separate lint, test and building work ([d1bfbe8](https://github.com/sabertazimi/boilerplate/commit/d1bfbe80cf751681f2b651167de4179674cca843))
240
+ - **deps-dev:** bump @types/jest from 26.0.24 to 27.0.1 ([3258c0e](https://github.com/sabertazimi/boilerplate/commit/3258c0ea6ba763828f27c33e01a36519251651be))
241
+ - **deps-dev:** bump @typescript-eslint/eslint-plugin ([ce6345e](https://github.com/sabertazimi/boilerplate/commit/ce6345e6ec63675dd895a18bf82cfbaf7666acf0))
242
+ - **deps-dev:** bump @typescript-eslint/eslint-plugin ([040c5a6](https://github.com/sabertazimi/boilerplate/commit/040c5a6f5bdfef8f7ad049a326f6351ac154e29b))
243
+ - **deps-dev:** bump @typescript-eslint/parser from 4.29.0 to 4.29.1 ([fce999d](https://github.com/sabertazimi/boilerplate/commit/fce999de888bf7fbbc8f90ab8f7705b498a78e08))
244
+ - **deps-dev:** bump @typescript-eslint/parser from 4.29.1 to 4.29.2 ([bfcabff](https://github.com/sabertazimi/boilerplate/commit/bfcabffd9e1350fb65cc2cae46ca3c8d22e25e38))
245
+ - **deps-dev:** bump tslib from 2.3.0 to 2.3.1 ([abf148a](https://github.com/sabertazimi/boilerplate/commit/abf148a8c32ecaa713de7344062a09255249fb3e))
246
+ - **deps-dev:** bump webpack from 5.49.0 to 5.50.0 ([6d07fa7](https://github.com/sabertazimi/boilerplate/commit/6d07fa7bdddec0cec373544b87b07b78fd38e288))
247
+ - **deps-dev:** bump webpack-cli from 4.7.2 to 4.8.0 ([9909a33](https://github.com/sabertazimi/boilerplate/commit/9909a331c119cf67697c4349d4feeb9031c7a7e9))
248
+ - **deps-dev:** remove redundant testing-library ([eaf0cba](https://github.com/sabertazimi/boilerplate/commit/eaf0cbaedf347845fc03dba2326473d9710f672a))
249
+ - **Jest-badge:** remove redundant error checking ([50bfd30](https://github.com/sabertazimi/boilerplate/commit/50bfd302e19b4ceef7f3656e4c3fed9f85ca77e5))
250
+ - **TypeScript:** remove types definition ([505faad](https://github.com/sabertazimi/boilerplate/commit/505faad5fc53be1bed4d5df26dbe2d4ef07e1e43))
251
+
252
+ ## [2.0.2](https://github.com/sabertazimi/boilerplate/compare/v2.0.1...v2.0.2) (2021-08-09)
253
+
254
+ ### Bug Fixes
255
+
256
+ - **deps-dev:** add node-fetch for badge generation ([166b8eb](https://github.com/sabertazimi/boilerplate/commit/166b8ebcb565f6c4da33c916c1036cce1c559631))
257
+
258
+ ### Building Work
259
+
260
+ - **CI:** generate Jest badge after building work ([fa8b1d3](https://github.com/sabertazimi/boilerplate/commit/fa8b1d3345acbfb9250b6e37a116d79a49ab6443))
261
+
262
+ ## [2.0.1](https://github.com/sabertazimi/boilerplate/compare/v2.0.0...v2.0.1) (2021-08-09)
263
+
264
+ ### Bug Fixes
265
+
266
+ - **boilerplate-ParticleFactory:** enable empty particle options ([0a9e904](https://github.com/sabertazimi/boilerplate/commit/0a9e904556cee80211b949a0ee03cc2c6231294f))
267
+
268
+ ### Building Work
269
+
270
+ - **Jest:** add Jest watch NPM script ([5f22023](https://github.com/sabertazimi/boilerplate/commit/5f22023f3e0a911071f48335e2cc7700d9dbda05))
271
+ - **Jest:** remove redundant log output ([5589f47](https://github.com/sabertazimi/boilerplate/commit/5589f47b34e2e425208a5884b419afb757485715))
272
+
273
+ ### Testing
274
+
275
+ - **boilerplate-Particle:** add ExplodingParticle testing ([f53ef6d](https://github.com/sabertazimi/boilerplate/commit/f53ef6dd0f984b3085c8adafabfcce8813f4702e))
276
+ - **boilerplate-ParticleFactory:** add full testing ([78f966d](https://github.com/sabertazimi/boilerplate/commit/78f966da4b249737036ca9331bf3c850a9c878ac))
277
+
278
+ # [2.0.0](https://github.com/sabertazimi/boilerplate/compare/v1.0.3...v2.0.0) (2021-08-09)
279
+
280
+ ### ⚠ BREAKING CHANGES
281
+
282
+ - **boilerplate-Particle:** bump to boilerplate v2 with TypeScript and Jest.
283
+
284
+ ### Features
285
+
286
+ - **boilerplate-particle:** add particle generation to boilerplate ([631f790](https://github.com/sabertazimi/boilerplate/commit/631f790a9501889b35d77dfd4af90f903f0e35ce))
287
+ - **boilerplate-Particle:** complete Particle module ([ee1d253](https://github.com/sabertazimi/boilerplate/commit/ee1d25374aa383eec8f8544eb7f96dbdd15f0ecb))
288
+ - **Jest:** add Jest testing support ([8a651f4](https://github.com/sabertazimi/boilerplate/commit/8a651f432f6631fe454195b1b4645ad666ff4550)), closes [#1](https://github.com/sabertazimi/boilerplate/issues/1)
289
+
290
+ ### Bug Fixes
291
+
292
+ - **boilerplate-HTML:** add canvas element ([dce01fd](https://github.com/sabertazimi/boilerplate/commit/dce01fd27e6b713b6fc3df158812689ad9003146))
293
+ - **css:** declare css module ([6f1e63f](https://github.com/sabertazimi/boilerplate/commit/6f1e63ff477bbcd8cadb19bd7467e2560f9a8038))
294
+ - **eslint-import:** resolve import for TypeScript modules ([d9a97df](https://github.com/sabertazimi/boilerplate/commit/d9a97dfac29a2dd5d52873d000bee742bf0ca870))
295
+ - **eslint:** rectify eslint resolver config error ([a99de54](https://github.com/sabertazimi/boilerplate/commit/a99de549814195a38690833748c6d1723949b571))
296
+
297
+ ### Building Work
298
+
299
+ - **deps-dev:** bump @babel/core from 7.14.8 to 7.15.0 ([c04da37](https://github.com/sabertazimi/boilerplate/commit/c04da371ff54a63d58c9d0be4101d29f172cadb4))
300
+ - **deps-dev:** bump @babel/preset-env from 7.14.9 to 7.15.0 ([61780e3](https://github.com/sabertazimi/boilerplate/commit/61780e3110a280a7f39a216f021e41e23458d723))
301
+ - **deps-dev:** bump @typescript-eslint/eslint-plugin ([2ef7344](https://github.com/sabertazimi/boilerplate/commit/2ef734483c9d4effaafad231a3b3de1dcac818bc))
302
+ - **deps-dev:** bump @typescript-eslint/parser from 4.28.5 to 4.29.0 ([5acb2d6](https://github.com/sabertazimi/boilerplate/commit/5acb2d6ca87fae5bc6776be8a4f0ee03f0cdabab))
303
+ - **deps-dev:** bump eslint-plugin-import from 2.23.4 to 2.24.0 ([7024df2](https://github.com/sabertazimi/boilerplate/commit/7024df28de585aadcffff8d35c1ed5c91478f66f))
304
+ - **deps-dev:** bump mini-css-extract-plugin from 2.1.0 to 2.2.0 ([cae0ca1](https://github.com/sabertazimi/boilerplate/commit/cae0ca1dad3b016e1709e24e870a82c76ee7f62e))
305
+ - **deps-dev:** bump ts-loader from 9.2.4 to 9.2.5 ([4c6cc9e](https://github.com/sabertazimi/boilerplate/commit/4c6cc9e8c6adf5f1442baca41773ffa77552fffb))
306
+ - **deps-dev:** bump webpack from 5.48.0 to 5.49.0 ([7944c33](https://github.com/sabertazimi/boilerplate/commit/7944c332640564be7e625f92c7d416348627b2d2))
307
+ - **deps-security:** npm audit fix ([b744bb1](https://github.com/sabertazimi/boilerplate/commit/b744bb14f5bc1d5f9e49ddc396a3385b5874b296))
308
+ - **tsconfig:** add baseUrl for webpack plugin ([8949f09](https://github.com/sabertazimi/boilerplate/commit/8949f09b5bbb825837074fd86ffd1da0adc49837))
309
+ - **webpack:** exclude coverage directory for stylelint ([038b7b8](https://github.com/sabertazimi/boilerplate/commit/038b7b81763b7023023474d6195ddf09c7afaa48))
310
+ - **webpack:** rectify resolve error ([b259d58](https://github.com/sabertazimi/boilerplate/commit/b259d587880b0569c3ab9050a7a9871f3f7a04e0))
311
+ - **webpack:** use tsconfig paths as resolve alias ([48b1861](https://github.com/sabertazimi/boilerplate/commit/48b18614dd0cd6a66ffde4d9d204707627b060bc))
312
+
313
+ ## [1.0.3](https://github.com/sabertazimi/boilerplate/compare/v1.0.2...v1.0.3) (2021-08-02)
314
+
315
+ ### Building Work
316
+
317
+ - **deps-dev:** bump webpack from 5.47.1 to 5.48.0 ([852c24c](https://github.com/sabertazimi/boilerplate/commit/852c24c648d40e4cec8c93626f5926a7e324e966))
318
+
319
+ ## [1.0.2](https://github.com/sabertazimi/boilerplate/compare/v1.0.1...v1.0.2) (2021-08-02)
320
+
321
+ ### Bug Fixes
322
+
323
+ - **release:** tag with signature ([5737247](https://github.com/sabertazimi/boilerplate/commit/57372479629ee41749bbae849ac36bcd4885685d))
324
+
325
+ ## [1.0.1](https://github.com/sabertazimi/boilerplate/compare/v1.0.0...v1.0.1) (2021-08-02)
326
+
327
+ ### Bug Fixes
328
+
329
+ - **index:** rename index.js to index.ts ([7d5f04f](https://github.com/sabertazimi/boilerplate/commit/7d5f04f228e63ba61bd311b3bea3aefd837f269d))
330
+
331
+ ### Building Work
332
+
333
+ - **CHANGELOG:** add more fields to CHANGELOG ([f76a1b1](https://github.com/sabertazimi/boilerplate/commit/f76a1b1ee92811536967402d3ab651b83b828847))
334
+ - **deps-dev:** bump @babel/preset-env from 7.14.8 to 7.14.9 ([1bcc570](https://github.com/sabertazimi/boilerplate/commit/1bcc570eca7b5a6c082139221d0ff6559de41797))
335
+ - **deps-dev:** bump @typescript-eslint/eslint-plugin ([0189069](https://github.com/sabertazimi/boilerplate/commit/0189069a784d1561c097be759308e8fc60d258f5))
336
+ - **deps-dev:** bump @typescript-eslint/parser from 4.28.4 to 4.28.5 ([0c494be](https://github.com/sabertazimi/boilerplate/commit/0c494bebf8cebc66bc8240f1e6ee1fd322ed9e20))
337
+ - **deps-dev:** bump eslint from 7.31.0 to 7.32.0 ([18d8d4e](https://github.com/sabertazimi/boilerplate/commit/18d8d4efaed6b4d2cde37612ca2be7664bbb37c2))
338
+ - **deps-dev:** bump webpack from 5.46.0 to 5.47.1 ([865e7b2](https://github.com/sabertazimi/boilerplate/commit/865e7b2245ca8b1293b579ea8efc50aefd610b15))
339
+
340
+ # 1.0.0 (2021-08-01)
341
+
342
+ ### Features
343
+
344
+ - **release:** add standard-version support ([ac99bb0](https://github.com/sabertazimi/boilerplate/commit/ac99bb00ea6146db79d2d3bbdd6febc45da56362))
345
+
346
+ ### Bug Fixes
347
+
348
+ - **css:** rectify font-stack variable ([9bc4b7f](https://github.com/sabertazimi/boilerplate/commit/9bc4b7fde1e2884c7085d47f80fe9f63a86c584a))
349
+ - **README:** rectify LICENSE badge error ([84314ae](https://github.com/sabertazimi/boilerplate/commit/84314ae01562a920e30daedbea3a9295b592bd26))
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Sabertaz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # Webpack Template
2
+
3
+ [![Author](https://img.shields.io/badge/author-sabertaz-lightgrey?style=for-the-badge)](https://github.com/sabertazimi)
4
+ [![LICENSE](https://img.shields.io/github/license/sabertazimi/bod?style=for-the-badge)](https://raw.githubusercontent.com/sabertazimi/bod/main/LICENSE)
5
+
6
+ [![CI](https://img.shields.io/github/actions/workflow/status/sabertazimi/bod/ci.yml?branch=main&style=for-the-badge&logo=github)](https://github.com/sabertazimi/bod/actions/workflows/ci.yml)
7
+
8
+ > Minimal wbepack boilerplate.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm i
14
+ npm start
15
+ ```
16
+
17
+ ## CLI Tool
18
+
19
+ ```bash
20
+ npx bod create <appName>
21
+ ```
22
+
23
+ More **CLI tool** information
24
+ on repo [Bod](https://github.com/sabertazimi/bod).
25
+
26
+ ## Features
27
+
28
+ - `TypeScript` ready. Robust type checking.
29
+ - `Babel` transpile support.
30
+ - `Webpack` for hot reload development and dedicated building work
31
+ with bundle analysis and elegant progressbar.
32
+ - `Jest` and `Testing Library` for robust unit tests and detailed coverage report.
33
+ - `PostCSS` for CSS auto-prefixer support.
34
+ - `ESLint` with TypeScript parser for TypeScript style check.
35
+ - `StyleLint` with custom rules for CSS style check.
36
+ - `Prettier` for format TypeScript and CSS code elegantly.
37
+ - Convenient version release with `Standard Version`.
38
+
39
+ ## React Support
40
+
41
+ ```bash
42
+ npm i react react-dom
43
+ npm i -D @types/react @types/react-dom
44
+ ```
45
+
46
+ ```bash
47
+ npm i -D @testing-library/react @testing-library/react-hooks
48
+ ```
49
+
50
+ ## Sass Support
51
+
52
+ ```bash
53
+ npm i -D sass @types/sass
54
+ ```
55
+
56
+ ## Contact
57
+
58
+ [![Email](https://img.shields.io/badge/-Gmail-ea4335?style=for-the-badge&logo=gmail&logoColor=white)](mailto:sabertazimi@gmail.com)
59
+ [![Twitter](https://img.shields.io/badge/-Twitter-1da1f2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/sabertazimi)
60
+ [![GitHub](https://img.shields.io/badge/-GitHub-181717?style=for-the-badge&logo=github&logoColor=white)](https://github.com/sabertazimi)
@@ -0,0 +1 @@
1
+ export { default } from '@dg-scripts/eslint-config'
package/index.d.ts ADDED
@@ -0,0 +1,60 @@
1
+ /// <reference types="node" />
2
+
3
+ declare namespace NodeJS {
4
+ interface ProcessEnv {
5
+ readonly NODE_ENV: 'development' | 'production' | 'test';
6
+ readonly PUBLIC_URL: string;
7
+ }
8
+ }
9
+
10
+ declare module '*.avif' {
11
+ const src: string;
12
+ export default src;
13
+ }
14
+
15
+ declare module '*.bmp' {
16
+ const src: string;
17
+ export default src;
18
+ }
19
+
20
+ declare module '*.gif' {
21
+ const src: string;
22
+ export default src;
23
+ }
24
+
25
+ declare module '*.jpg' {
26
+ const src: string;
27
+ export default src;
28
+ }
29
+
30
+ declare module '*.jpeg' {
31
+ const src: string;
32
+ export default src;
33
+ }
34
+
35
+ declare module '*.png' {
36
+ const src: string;
37
+ export default src;
38
+ }
39
+
40
+ declare module '*.webp' {
41
+ const src: string;
42
+ export default src;
43
+ }
44
+
45
+ declare module '*.css';
46
+
47
+ declare module '*.module.css' {
48
+ const classes: { readonly [key: string]: string };
49
+ export default classes;
50
+ }
51
+
52
+ declare module '*.module.scss' {
53
+ const classes: { readonly [key: string]: string };
54
+ export default classes;
55
+ }
56
+
57
+ declare module '*.module.sass' {
58
+ const classes: { readonly [key: string]: string };
59
+ export default classes;
60
+ }
package/jest.config.js ADDED
@@ -0,0 +1,39 @@
1
+ /* eslint-disable @typescript-eslint/no-var-requires */
2
+ const { pathsToModuleNameMapper } = require('ts-jest');
3
+ const { compilerOptions } = require('./tsconfig.json');
4
+
5
+ const paths = pathsToModuleNameMapper(compilerOptions.paths, {
6
+ prefix: '<rootDir>/',
7
+ });
8
+
9
+ /** @type {import('ts-jest').JestConfigWithTsJest} */
10
+ module.exports = {
11
+ collectCoverage: true,
12
+ coverageDirectory: 'coverage',
13
+ coverageReporters: ['json-summary', 'lcov', 'text', 'clover'],
14
+ preset: 'ts-jest',
15
+ moduleNameMapper: {
16
+ ...paths,
17
+ },
18
+ testPathIgnorePatterns: [
19
+ 'node_modules',
20
+ '\\.cache',
21
+ '<rootDir>/build',
22
+ '<rootDir>/dist',
23
+ '<rootDir>/coverage',
24
+ ],
25
+ transform: {
26
+ '^.+\\.tsx?$': [
27
+ 'ts-jest',
28
+ {
29
+ tsconfig: 'tsconfig.json',
30
+ },
31
+ ],
32
+ },
33
+ testEnvironmentOptions: {
34
+ url: 'http://localhost',
35
+ },
36
+ testEnvironment: 'jsdom',
37
+ setupFiles: ['<rootDir>/jest.env.setup.js'],
38
+ setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
39
+ };
@@ -0,0 +1,6 @@
1
+ const path = require('path');
2
+ const dotenv = require('dotenv');
3
+
4
+ dotenv.config({
5
+ path: path.resolve(process.cwd(), '.test.env'),
6
+ });
package/jest.setup.js ADDED
@@ -0,0 +1,21 @@
1
+ // require('@testing-library/jest-dom/extend-expect');
2
+
3
+ Object.defineProperty(window, 'matchMedia', {
4
+ writable: true,
5
+ value: jest.fn().mockImplementation((query) => ({
6
+ matches: false,
7
+ media: query,
8
+ onchange: null,
9
+ addListener: jest.fn(), // deprecated
10
+ removeListener: jest.fn(), // deprecated
11
+ addEventListener: jest.fn(),
12
+ removeEventListener: jest.fn(),
13
+ dispatchEvent: jest.fn(),
14
+ })),
15
+ });
16
+
17
+ window.requestAnimationFrame = function (callback) {
18
+ return setTimeout(callback);
19
+ };
20
+
21
+ window.cancelAnimationFrame = window.clearTimeout;