@dg-scripts/webpack-template 5.17.0

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,384 @@
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
+ # [2.10.0](https://github.com/sabertazimi/boilerplate/compare/v2.9.0...v2.10.0) (2022-05-29)
7
+
8
+
9
+ ### :rocket: Building Work
10
+
11
+ * **deps-bot:** disable lockfile maintenance ([7ec6de5](https://github.com/sabertazimi/boilerplate/commit/7ec6de58bae442b106536388739ba0d54b8d44e8))
12
+
13
+
14
+ ### :bug: Bug Fixes
15
+
16
+ * **jest-config:** rectify jest utils path ([7a20864](https://github.com/sabertazimi/boilerplate/commit/7a20864df7b9a19d77a4de83f8d90c82f4235922))
17
+ * webpack noise printed only if error or warning ([#349](https://github.com/sabertazimi/boilerplate/issues/349)) ([f2b8571](https://github.com/sabertazimi/boilerplate/commit/f2b857117ed394034889be231635aa8e4184693e))
18
+ * **webpack-svgr:** update svgo configuration for v6 ([43224c2](https://github.com/sabertazimi/boilerplate/commit/43224c22270519e4c8d9672a630efe4cf02b01a6))
19
+
20
+
21
+ ### :sparkles: Features
22
+
23
+ * **postcss:** add support for postcss presets ([#376](https://github.com/sabertazimi/boilerplate/issues/376)) ([2110fb6](https://github.com/sabertazimi/boilerplate/commit/2110fb635474dd38654907fe9bff8307b417eef9))
24
+
25
+ # [2.9.0](https://github.com/sabertazimi/boilerplate/compare/v2.8.0...v2.9.0) (2021-10-27)
26
+
27
+
28
+ ### :bug: Bug Fixes
29
+
30
+ * **deps:** bump `dg-scripts/*` to 5.5.0 ([c006367](https://github.com/sabertazimi/boilerplate/commit/c006367dcc8022c1525f956c7517dba48fefbbc6))
31
+ * **deps:** bump eslint to v8 ([369c46c](https://github.com/sabertazimi/boilerplate/commit/369c46c1f5b61118babc654db2b556b100a427a2))
32
+ * **deps:** bump linter configuration to 5.5.3 ([f0f9781](https://github.com/sabertazimi/boilerplate/commit/f0f978185e7308e8d8a55c39c5e6de75fedaf053))
33
+
34
+
35
+ ### :rocket: Building Work
36
+
37
+ * **deps-bot:** remove GitHub dependabot ([263fea6](https://github.com/sabertazimi/boilerplate/commit/263fea6e8ccd806484bad15b197cfcdd773f3734))
38
+ * **deps-dev:** bump `@dg-scripts/*` to 1.1.1 ([6740697](https://github.com/sabertazimi/boilerplate/commit/674069747c8d3b2bafc069ca0475819f9ffe3a08))
39
+ * **deps:** bundle bod deps into single PR ([daaf06a](https://github.com/sabertazimi/boilerplate/commit/daaf06afd436dbaa44ee2ebb2ebf8c8e913388e6))
40
+ * **lint:** disable auto-fix for linter ([df24f40](https://github.com/sabertazimi/boilerplate/commit/df24f40088cb38eae8a3ad91030c8f77916246c5))
41
+ * **yarn:** bump yarn from v3.0.2 to v3.1.0 ([348211b](https://github.com/sabertazimi/boilerplate/commit/348211b810650de13f4d6e8c8db911ea96355e4b))
42
+
43
+
44
+ ### :sparkles: Features
45
+
46
+ * **sass:** ship to `dart-sass`, drop `node-sass` ([1e4294a](https://github.com/sabertazimi/boilerplate/commit/1e4294a9532945ab665654cb9845f0c13928d135))
47
+
48
+ # [2.8.0](https://github.com/sabertazimi/boilerplate/compare/v2.7.1...v2.8.0) (2021-09-23)
49
+
50
+
51
+ ### :bug: Bug Fixes
52
+
53
+ * **template-test:** remove conditional expect statement ([70ce24a](https://github.com/sabertazimi/boilerplate/commit/70ce24ac911ea43da75f6557ada0dc7f627b8c59))
54
+
55
+
56
+ ### :sparkles: Features
57
+
58
+ * **linter:** add `[@dg-scripts](https://github.com/dg-scripts)` linter configuration ([475c01a](https://github.com/sabertazimi/boilerplate/commit/475c01a09eea476e0b1f8c9d9b8bc44e0e2d3ac9))
59
+
60
+
61
+ ### :rocket: Building Work
62
+
63
+ * **CI:** add multiple environment for building ([c17a176](https://github.com/sabertazimi/boilerplate/commit/c17a17625942cdf57872c28a03e57fe165ed90a0))
64
+ * **CI:** add multiple environment for testing ([544e6ec](https://github.com/sabertazimi/boilerplate/commit/544e6ec853db1b206c85e8076ac98d2ecae3d1e4))
65
+ * **CI:** switch `coveralls` to `codecov` ([af04e9b](https://github.com/sabertazimi/boilerplate/commit/af04e9b4c102fcfbca2b52fbed7826130e7a2fed))
66
+ * **deps-bot:** change PR concurrent limits ([bc18455](https://github.com/sabertazimi/boilerplate/commit/bc184557bbc7c019c3105d10109d631bdf179e91))
67
+ * **deps-bot:** enable non-major deps automerge ([b70d62e](https://github.com/sabertazimi/boilerplate/commit/b70d62e0e29479e71bfe3079a7ece401f94a5a21))
68
+ * **deps-bot:** setup renovate bot configuration ([88fb53f](https://github.com/sabertazimi/boilerplate/commit/88fb53f059edaecd9d9c5a53954fd68fd1c8c327))
69
+ * **deps-bot:** widen peerDeps and engines ([e427f47](https://github.com/sabertazimi/boilerplate/commit/e427f47b3dd951a430e2bcbe4452e336389b20d1))
70
+ * **deps-dev:** bump `[@dg-scripts](https://github.com/dg-scripts)` to latest version ([7441aa4](https://github.com/sabertazimi/boilerplate/commit/7441aa4983804836a0ba3fbfa72e34d219a2f2e3))
71
+
72
+ ## [2.7.1](https://github.com/sabertazimi/boilerplate/compare/v2.7.0...v2.7.1) (2021-09-12)
73
+
74
+
75
+ ### :wrench: Testing
76
+
77
+ * **template-Particle:** add mocks for canvas function ([757b3ed](https://github.com/sabertazimi/boilerplate/commit/757b3ed95d9b6d59b4dac6df2f26e199507bf219))
78
+
79
+
80
+ ### :bug: Bug Fixes
81
+
82
+ * **template-canvas:** save context before new draw ([a92e2e4](https://github.com/sabertazimi/boilerplate/commit/a92e2e40ce63658d08efc9119809eddc1b5c7963))
83
+ * **tsconfig:** exclude testing files ([f09e986](https://github.com/sabertazimi/boilerplate/commit/f09e986955352c97176cde18bed5bfcf516a8e93))
84
+ * **webpack-profile:** disable ugly functions when profiling ([b9b471d](https://github.com/sabertazimi/boilerplate/commit/b9b471d465bdc896f9e81c41dcaf9af1892f3323))
85
+ * **webpack:** add `devServer` types for VSCode intellisense ([8a2be17](https://github.com/sabertazimi/boilerplate/commit/8a2be171b7e304d82cbea3fed068b128af414c47))
86
+ * **webpack:** setup `mode` and `devServer` configuration ([37f6608](https://github.com/sabertazimi/boilerplate/commit/37f660839908d1a4a2c7f94be62ef6aa79133eda))
87
+
88
+
89
+ ### :rocket: Building Work
90
+
91
+ * **CI-CodeQL:** add CodeQL analysis ([8184f16](https://github.com/sabertazimi/boilerplate/commit/8184f1618c7a6cc6db7fbc0238810141a95e6297))
92
+ * **deps-bot:** add renovate.json ([#98](https://github.com/sabertazimi/boilerplate/issues/98)) ([e39d59d](https://github.com/sabertazimi/boilerplate/commit/e39d59dea41dd0ba40b662bf65c1984f1cee9839))
93
+ * **deps-bot:** setup renovate bot configuration ([c49b38a](https://github.com/sabertazimi/boilerplate/commit/c49b38a3be2cab730d1e21da3ea809b004113feb))
94
+ * **deps:** add missing peer deps ([6d00148](https://github.com/sabertazimi/boilerplate/commit/6d00148cff47d71c58ad2db3437b44fc55963191))
95
+ * **scripts:** rectify stylelint path matching ([5672c6b](https://github.com/sabertazimi/boilerplate/commit/5672c6b0edfd4859dae069aaa628fa8ceaf1db24))
96
+ * **yarn:** ship to yarn berry ([e925cf1](https://github.com/sabertazimi/boilerplate/commit/e925cf1f1504cbc01fc436c098d78e386c72ca96))
97
+
98
+ # [2.7.0](https://github.com/sabertazimi/boilerplate/compare/v2.6.0...v2.7.0) (2021-09-06)
99
+
100
+
101
+ ### :bug: Bug Fixes
102
+
103
+ * **TypeScript-types:** add more third party types ([0b628fa](https://github.com/sabertazimi/boilerplate/commit/0b628fa7829db5d2867eba11ed790aee30ccf01a))
104
+ * **webpack-split chunks:** improve split chunks configuration ([d76d2a3](https://github.com/sabertazimi/boilerplate/commit/d76d2a332d97303c0dbf27716b9f72960279801e))
105
+ * **webpack:** disable production source map ([525e803](https://github.com/sabertazimi/boilerplate/commit/525e803c296a24ea130a7c9b9bb7da1b8ff68f72))
106
+
107
+
108
+ ### :rocket: Building Work
109
+
110
+ * **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))
111
+ * **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))
112
+ * **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))
113
+ * **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))
114
+ * **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))
115
+ * **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))
116
+ * **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))
117
+ * **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))
118
+ * **Jest:** enable Jest config intellisense ([01f9140](https://github.com/sabertazimi/boilerplate/commit/01f9140e389f2e9c3e1c59c50afd855490a17b69))
119
+ * **webpack:** enable webpack config intellisense ([2bcb3aa](https://github.com/sabertazimi/boilerplate/commit/2bcb3aab2f12c0d2b00aae80bb9591f6c883f720))
120
+ * **webpack:** split `particle` into a single chunk ([d21c081](https://github.com/sabertazimi/boilerplate/commit/d21c08121d628b54f8f79123b50f9a621f5fb54a))
121
+
122
+ # [2.6.0](https://github.com/sabertazimi/boilerplate/compare/v2.5.0...v2.6.0) (2021-09-03)
123
+
124
+
125
+ ### :zap: Performance
126
+
127
+ * **webpack-output:** change `chunkhash` to `contenthash` ([9120c17](https://github.com/sabertazimi/boilerplate/commit/9120c17ddc8cd3c0a59e846532bd1516d10c3fa0))
128
+ * **webpack:** enable build cache ([ad0baa3](https://github.com/sabertazimi/boilerplate/commit/ad0baa365d6c2fce134e1e233b112ae2f890adb5))
129
+ * **webpack:** improve extension resolve performance ([12698c5](https://github.com/sabertazimi/boilerplate/commit/12698c5ab90958a8641bc7e5a5fee9841cbd2d17))
130
+
131
+
132
+ ### :sparkles: Features
133
+
134
+ * **stylelint:** setup complex stylelint configuration ([705182b](https://github.com/sabertazimi/boilerplate/commit/705182bb6dd57b7501b0cb65aeeb3d5da4e3bee0))
135
+ * **webpack-minimize:** add JS and CSS minimizer support ([1ec8a2e](https://github.com/sabertazimi/boilerplate/commit/1ec8a2ef63b79eac60b9ab423df5af86564ef8cc))
136
+ * **webpack-split chunks:** enable split vendor chunks ([88a4643](https://github.com/sabertazimi/boilerplate/commit/88a4643ab0ef073f58dbfe1be20a16e01183d194))
137
+ * **webpack:** enable hot module replacement ([5208d1f](https://github.com/sabertazimi/boilerplate/commit/5208d1f2df23b813a2f8affb0ccd0b2d6d61e98e))
138
+
139
+
140
+ ### :bug: Bug Fixes
141
+
142
+ * **css:** rectify rule order ([7be7869](https://github.com/sabertazimi/boilerplate/commit/7be786971919c2ff3fc80750b363af942b6ab673))
143
+
144
+
145
+ ### :rocket: Building Work
146
+
147
+ * **CI-badge:** move badge generation to `test` stage ([1c30035](https://github.com/sabertazimi/boilerplate/commit/1c300350c132c8413baf7e7dec784c7d55123c81))
148
+ * **CI:** separate CI stages ([aa7af27](https://github.com/sabertazimi/boilerplate/commit/aa7af27a85fd870318d3dfe0cb236ac35f67aaa0))
149
+ * **Jest-badge:** format code ([00cd3be](https://github.com/sabertazimi/boilerplate/commit/00cd3be8feb1c8aabc3236fd378b3e83a220af04))
150
+
151
+ # [2.5.0](https://github.com/sabertazimi/boilerplate/compare/v2.4.0...v2.5.0) (2021-09-03)
152
+
153
+
154
+ ### :rocket: Building Work
155
+
156
+ * **CI:** remove redundant artifacts stage ([d3a8898](https://github.com/sabertazimi/boilerplate/commit/d3a8898024cb3f5a13da283a3ef8e97fa9bc574f))
157
+
158
+
159
+ ### :sparkles: Features
160
+
161
+ * **css-modules:** enable css modules suuport ([5061aba](https://github.com/sabertazimi/boilerplate/commit/5061abaf4694d7a343870a7a85c97fca859df9d4))
162
+
163
+
164
+ ### :bug: Bug Fixes
165
+
166
+ * **devtool-source map:** change source map configuration ([d114a7e](https://github.com/sabertazimi/boilerplate/commit/d114a7ebccc4ec8a6bf1eeeb10383d18c073b3fa))
167
+
168
+ # [2.4.0](https://github.com/sabertazimi/boilerplate/compare/v2.3.0...v2.4.0) (2021-08-31)
169
+
170
+
171
+ ### :sparkles: Features
172
+
173
+ * **webpack-UI:** add elegant progressbar CLI UI ([a42ebb8](https://github.com/sabertazimi/boilerplate/commit/a42ebb89bbe2e1ad53e157a49d22a90e745b8164))
174
+
175
+
176
+ ### :rocket: Building Work
177
+
178
+ * **dependabot:** change versioning strategy to `increase` ([75fc549](https://github.com/sabertazimi/boilerplate/commit/75fc549a604ed8440f173c0090f9857ed688102f))
179
+ * **deps-dev:** bump @types/node from 16.6.2 to 16.7.1 ([44be075](https://github.com/sabertazimi/boilerplate/commit/44be0757e939652f52ccfe3bca63d899961df862))
180
+ * **deps-dev:** bump @types/node from 16.7.1 to 16.7.4 ([493e089](https://github.com/sabertazimi/boilerplate/commit/493e08925abe7ed675a618ed7a383fa49f42071e))
181
+ * **deps-dev:** bump @types/node from 16.7.4 to 16.7.6 ([1f648e4](https://github.com/sabertazimi/boilerplate/commit/1f648e4997fb9c65d63023004de651c24ded37dc))
182
+ * **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))
183
+ * **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))
184
+ * **deps-dev:** bump @typescript-eslint/eslint-plugin ([9b2d2d5](https://github.com/sabertazimi/boilerplate/commit/9b2d2d59e62260cc001dd4f76d9d216f8310ea4e))
185
+ * **deps-dev:** bump @typescript-eslint/eslint-plugin ([#80](https://github.com/sabertazimi/boilerplate/issues/80)) ([7a4bc7b](https://github.com/sabertazimi/boilerplate/commit/7a4bc7b74916f9dee4b07bcd9ee49632cc30a4ad))
186
+ * **deps-dev:** bump @typescript-eslint/parser from 4.29.2 to 4.29.3 ([dd59e36](https://github.com/sabertazimi/boilerplate/commit/dd59e3618e40c80fcab37036c71ec878783f0004))
187
+ * **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))
188
+ * **deps-dev:** bump autoprefixer from 10.3.1 to 10.3.2 ([6ce5f1c](https://github.com/sabertazimi/boilerplate/commit/6ce5f1c873c57d4826b52d43d965d03a1878d5ca))
189
+ * **deps-dev:** bump autoprefixer from 10.3.2 to 10.3.3 ([261294d](https://github.com/sabertazimi/boilerplate/commit/261294de10202a22763221aabf6dc48bef99d78a))
190
+ * **deps-dev:** bump eslint-plugin-import from 2.24.0 to 2.24.1 ([b298b4a](https://github.com/sabertazimi/boilerplate/commit/b298b4a58e4a89d2eef6b6ebd5d9e150911a0171))
191
+ * **deps-dev:** bump eslint-plugin-import from 2.24.1 to 2.24.2 ([c267e1d](https://github.com/sabertazimi/boilerplate/commit/c267e1d7fea2c7922289a7d532f9ffd3dda4cc56))
192
+ * **deps-dev:** bump eslint-plugin-prettier from 3.4.0 to 3.4.1 ([01bfd14](https://github.com/sabertazimi/boilerplate/commit/01bfd14628a94b68421b52c639e1d97257070d9b))
193
+ * **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))
194
+ * **deps-dev:** bump eslint-plugin-react from 7.24.0 to 7.25.0 ([978f0de](https://github.com/sabertazimi/boilerplate/commit/978f0deb974d0fecb3f2d35f8f678c008cc1e249))
195
+ * **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))
196
+ * **deps-dev:** bump jest from 27.0.6 to 27.1.0 ([d415264](https://github.com/sabertazimi/boilerplate/commit/d4152648a8a89534097ab76095e28631fa5a9d9b))
197
+ * **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))
198
+ * **deps-dev:** bump typescript from 4.3.5 to 4.4.2 ([870b653](https://github.com/sabertazimi/boilerplate/commit/870b6532d42b7f00402d30139f69b9927fbd83ac))
199
+ * **deps-dev:** bump webpack from 5.51.0 to 5.51.1 ([11bb681](https://github.com/sabertazimi/boilerplate/commit/11bb6816f002f7f89f99360138aa2c0b6866b07d))
200
+ * **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))
201
+ * **Jest-badge:** rectify unknown error type in TS 4.4.0 ([115fc46](https://github.com/sabertazimi/boilerplate/commit/115fc464b148b33cae2029708fdde0d1ab674c67))
202
+
203
+ # [2.3.0](https://github.com/sabertazimi/boilerplate/compare/v2.2.0...v2.3.0) (2021-08-19)
204
+
205
+
206
+ ### :sparkles: Features
207
+
208
+ * **webpack:** add bundle analyzer support ([e708c1f](https://github.com/sabertazimi/boilerplate/commit/e708c1f8bba87056ea014e5a2c59613263361534))
209
+
210
+ # [2.2.0](https://github.com/sabertazimi/boilerplate/compare/v2.1.0...v2.2.0) (2021-08-19)
211
+
212
+
213
+ ### :bug: Bug Fixes
214
+
215
+ * **CHANGELOG:** add emoji to changelog ([98961b1](https://github.com/sabertazimi/boilerplate/commit/98961b12316e8d96f82ddebef8418b1dbbc08549))
216
+ * **Jest:** rectify deprecated `ts-jest` config ([e2b197a](https://github.com/sabertazimi/boilerplate/commit/e2b197abeb6d4874746bae9afc31ebba9f21dc02))
217
+
218
+
219
+ ### :rocket: Building Work
220
+
221
+ * **CI-azure:** add more pipeline triggers ([37e2ebe](https://github.com/sabertazimi/boilerplate/commit/37e2ebe873fd847efb102603ebc7ad1655a3daa2))
222
+ * **CI:** initialize git config ([f3d7ee6](https://github.com/sabertazimi/boilerplate/commit/f3d7ee6e2c085addc7b4db8e4c72dd246fc82c1a))
223
+ * **CI:** set up CI with Azure Pipelines ([7a98a8f](https://github.com/sabertazimi/boilerplate/commit/7a98a8f1c4b616c3d469897c260ef02420687c5e))
224
+ * **deps-dev:** bump @types/node from 16.6.1 to 16.6.2 ([e8192d5](https://github.com/sabertazimi/boilerplate/commit/e8192d589a8d1d6937c14751367d07203662e665))
225
+ * **deps-dev:** bump ts-jest from 27.0.4 to 27.0.5 ([722754c](https://github.com/sabertazimi/boilerplate/commit/722754cbf9b6d87508b8c044ac67094533d3c0a0))
226
+ * **deps-dev:** bump ts-node from 10.2.0 to 10.2.1 ([7a57323](https://github.com/sabertazimi/boilerplate/commit/7a573232cc2aefce50850df6e5b7740f578bb56b))
227
+ * **deps-dev:** bump webpack from 5.50.0 to 5.51.0 ([b42b5e7](https://github.com/sabertazimi/boilerplate/commit/b42b5e74ef769e5d682c145a460c50115d82482e))
228
+ * **deps-dev:** bump webpack-dev-server from 3.11.2 to 4.0.0 ([46fba74](https://github.com/sabertazimi/boilerplate/commit/46fba74a0a2bd9eb57f040d94e066cf32a177ef8))
229
+
230
+
231
+ ### :sparkles: Features
232
+
233
+ * **test-coverage:** add support for coveralls report ([d5f7758](https://github.com/sabertazimi/boilerplate/commit/d5f77584871809d1d271af8c4c1632ddab61556c))
234
+ * **webpack-assets:** process assets files with webpack assets module ([215afc1](https://github.com/sabertazimi/boilerplate/commit/215afc13d4b683b8cb4038ebbdfa7a9fe6aa4689))
235
+
236
+ # [2.1.0](https://github.com/sabertazimi/boilerplate/compare/v2.0.2...v2.1.0) (2021-08-17)
237
+
238
+
239
+ ### Features
240
+
241
+ * **TypeScript:** add ts-node for supporting TS scripts ([6110d90](https://github.com/sabertazimi/boilerplate/commit/6110d906f2195ffe53b655134f9bc9447629c0c3))
242
+
243
+
244
+ ### Bug Fixes
245
+
246
+ * **boilerplate-test:** move mock setup to before/after hook ([7911db7](https://github.com/sabertazimi/boilerplate/commit/7911db74d76a5d8cf80585ccc66b59173319796c))
247
+ * **deps-security:** bump url-parse from 1.5.1 to 1.5.3 ([bd57d6c](https://github.com/sabertazimi/boilerplate/commit/bd57d6c8deafc74c942c308500d26cadfdfb243a))
248
+ * **deps-types:** add missing node-fetch TS types ([94da0bf](https://github.com/sabertazimi/boilerplate/commit/94da0bff957c22f6f51e5dcb7815c74dc6e844a5))
249
+ * **Jest-badge:** rectify ts-node config ([4232ee6](https://github.com/sabertazimi/boilerplate/commit/4232ee65c6f24893924e952412de262236305979))
250
+ * **Jest-badge:** rewrite badge generation with TS ([07cc25a](https://github.com/sabertazimi/boilerplate/commit/07cc25ad859db51a3c6bf9aeec3346320419d842))
251
+
252
+
253
+ ### Testing
254
+
255
+ * **NODE_ENV:** set NODE_ENV to `test` ([2f2ca66](https://github.com/sabertazimi/boilerplate/commit/2f2ca66a790f07ec75de94901fdb1193205f2637))
256
+
257
+
258
+ ### Building Work
259
+
260
+ * **CI:** separate lint, test and building work ([d1bfbe8](https://github.com/sabertazimi/boilerplate/commit/d1bfbe80cf751681f2b651167de4179674cca843))
261
+ * **deps-dev:** bump @types/jest from 26.0.24 to 27.0.1 ([3258c0e](https://github.com/sabertazimi/boilerplate/commit/3258c0ea6ba763828f27c33e01a36519251651be))
262
+ * **deps-dev:** bump @typescript-eslint/eslint-plugin ([ce6345e](https://github.com/sabertazimi/boilerplate/commit/ce6345e6ec63675dd895a18bf82cfbaf7666acf0))
263
+ * **deps-dev:** bump @typescript-eslint/eslint-plugin ([040c5a6](https://github.com/sabertazimi/boilerplate/commit/040c5a6f5bdfef8f7ad049a326f6351ac154e29b))
264
+ * **deps-dev:** bump @typescript-eslint/parser from 4.29.0 to 4.29.1 ([fce999d](https://github.com/sabertazimi/boilerplate/commit/fce999de888bf7fbbc8f90ab8f7705b498a78e08))
265
+ * **deps-dev:** bump @typescript-eslint/parser from 4.29.1 to 4.29.2 ([bfcabff](https://github.com/sabertazimi/boilerplate/commit/bfcabffd9e1350fb65cc2cae46ca3c8d22e25e38))
266
+ * **deps-dev:** bump tslib from 2.3.0 to 2.3.1 ([abf148a](https://github.com/sabertazimi/boilerplate/commit/abf148a8c32ecaa713de7344062a09255249fb3e))
267
+ * **deps-dev:** bump webpack from 5.49.0 to 5.50.0 ([6d07fa7](https://github.com/sabertazimi/boilerplate/commit/6d07fa7bdddec0cec373544b87b07b78fd38e288))
268
+ * **deps-dev:** bump webpack-cli from 4.7.2 to 4.8.0 ([9909a33](https://github.com/sabertazimi/boilerplate/commit/9909a331c119cf67697c4349d4feeb9031c7a7e9))
269
+ * **deps-dev:** remove redundant testing-library ([eaf0cba](https://github.com/sabertazimi/boilerplate/commit/eaf0cbaedf347845fc03dba2326473d9710f672a))
270
+ * **Jest-badge:** remove redundant error checking ([50bfd30](https://github.com/sabertazimi/boilerplate/commit/50bfd302e19b4ceef7f3656e4c3fed9f85ca77e5))
271
+ * **TypeScript:** remove types definition ([505faad](https://github.com/sabertazimi/boilerplate/commit/505faad5fc53be1bed4d5df26dbe2d4ef07e1e43))
272
+
273
+ ## [2.0.2](https://github.com/sabertazimi/boilerplate/compare/v2.0.1...v2.0.2) (2021-08-09)
274
+
275
+
276
+ ### Bug Fixes
277
+
278
+ * **deps-dev:** add node-fetch for badge generation ([166b8eb](https://github.com/sabertazimi/boilerplate/commit/166b8ebcb565f6c4da33c916c1036cce1c559631))
279
+
280
+
281
+ ### Building Work
282
+
283
+ * **CI:** generate Jest badge after building work ([fa8b1d3](https://github.com/sabertazimi/boilerplate/commit/fa8b1d3345acbfb9250b6e37a116d79a49ab6443))
284
+
285
+ ## [2.0.1](https://github.com/sabertazimi/boilerplate/compare/v2.0.0...v2.0.1) (2021-08-09)
286
+
287
+
288
+ ### Bug Fixes
289
+
290
+ * **boilerplate-ParticleFactory:** enable empty particle options ([0a9e904](https://github.com/sabertazimi/boilerplate/commit/0a9e904556cee80211b949a0ee03cc2c6231294f))
291
+
292
+
293
+ ### Building Work
294
+
295
+ * **Jest:** add Jest watch NPM script ([5f22023](https://github.com/sabertazimi/boilerplate/commit/5f22023f3e0a911071f48335e2cc7700d9dbda05))
296
+ * **Jest:** remove redundant log output ([5589f47](https://github.com/sabertazimi/boilerplate/commit/5589f47b34e2e425208a5884b419afb757485715))
297
+
298
+
299
+ ### Testing
300
+
301
+ * **boilerplate-Particle:** add ExplodingParticle testing ([f53ef6d](https://github.com/sabertazimi/boilerplate/commit/f53ef6dd0f984b3085c8adafabfcce8813f4702e))
302
+ * **boilerplate-ParticleFactory:** add full testing ([78f966d](https://github.com/sabertazimi/boilerplate/commit/78f966da4b249737036ca9331bf3c850a9c878ac))
303
+
304
+ # [2.0.0](https://github.com/sabertazimi/boilerplate/compare/v1.0.3...v2.0.0) (2021-08-09)
305
+
306
+
307
+ ### ⚠ BREAKING CHANGES
308
+
309
+ * **boilerplate-Particle:** bump to boilerplate v2 with TypeScript and Jest.
310
+
311
+ ### Features
312
+
313
+ * **boilerplate-particle:** add particle generation to boilerplate ([631f790](https://github.com/sabertazimi/boilerplate/commit/631f790a9501889b35d77dfd4af90f903f0e35ce))
314
+ * **boilerplate-Particle:** complete Particle module ([ee1d253](https://github.com/sabertazimi/boilerplate/commit/ee1d25374aa383eec8f8544eb7f96dbdd15f0ecb))
315
+ * **Jest:** add Jest testing support ([8a651f4](https://github.com/sabertazimi/boilerplate/commit/8a651f432f6631fe454195b1b4645ad666ff4550)), closes [#1](https://github.com/sabertazimi/boilerplate/issues/1)
316
+
317
+
318
+ ### Bug Fixes
319
+
320
+ * **boilerplate-HTML:** add canvas element ([dce01fd](https://github.com/sabertazimi/boilerplate/commit/dce01fd27e6b713b6fc3df158812689ad9003146))
321
+ * **css:** declare css module ([6f1e63f](https://github.com/sabertazimi/boilerplate/commit/6f1e63ff477bbcd8cadb19bd7467e2560f9a8038))
322
+ * **eslint-import:** resolve import for TypeScript modules ([d9a97df](https://github.com/sabertazimi/boilerplate/commit/d9a97dfac29a2dd5d52873d000bee742bf0ca870))
323
+ * **eslint:** rectify eslint resolver config error ([a99de54](https://github.com/sabertazimi/boilerplate/commit/a99de549814195a38690833748c6d1723949b571))
324
+
325
+
326
+ ### Building Work
327
+
328
+ * **deps-dev:** bump @babel/core from 7.14.8 to 7.15.0 ([c04da37](https://github.com/sabertazimi/boilerplate/commit/c04da371ff54a63d58c9d0be4101d29f172cadb4))
329
+ * **deps-dev:** bump @babel/preset-env from 7.14.9 to 7.15.0 ([61780e3](https://github.com/sabertazimi/boilerplate/commit/61780e3110a280a7f39a216f021e41e23458d723))
330
+ * **deps-dev:** bump @typescript-eslint/eslint-plugin ([2ef7344](https://github.com/sabertazimi/boilerplate/commit/2ef734483c9d4effaafad231a3b3de1dcac818bc))
331
+ * **deps-dev:** bump @typescript-eslint/parser from 4.28.5 to 4.29.0 ([5acb2d6](https://github.com/sabertazimi/boilerplate/commit/5acb2d6ca87fae5bc6776be8a4f0ee03f0cdabab))
332
+ * **deps-dev:** bump eslint-plugin-import from 2.23.4 to 2.24.0 ([7024df2](https://github.com/sabertazimi/boilerplate/commit/7024df28de585aadcffff8d35c1ed5c91478f66f))
333
+ * **deps-dev:** bump mini-css-extract-plugin from 2.1.0 to 2.2.0 ([cae0ca1](https://github.com/sabertazimi/boilerplate/commit/cae0ca1dad3b016e1709e24e870a82c76ee7f62e))
334
+ * **deps-dev:** bump ts-loader from 9.2.4 to 9.2.5 ([4c6cc9e](https://github.com/sabertazimi/boilerplate/commit/4c6cc9e8c6adf5f1442baca41773ffa77552fffb))
335
+ * **deps-dev:** bump webpack from 5.48.0 to 5.49.0 ([7944c33](https://github.com/sabertazimi/boilerplate/commit/7944c332640564be7e625f92c7d416348627b2d2))
336
+ * **deps-security:** npm audit fix ([b744bb1](https://github.com/sabertazimi/boilerplate/commit/b744bb14f5bc1d5f9e49ddc396a3385b5874b296))
337
+ * **tsconfig:** add baseUrl for webpack plugin ([8949f09](https://github.com/sabertazimi/boilerplate/commit/8949f09b5bbb825837074fd86ffd1da0adc49837))
338
+ * **webpack:** exclude coverage directory for stylelint ([038b7b8](https://github.com/sabertazimi/boilerplate/commit/038b7b81763b7023023474d6195ddf09c7afaa48))
339
+ * **webpack:** rectify resolve error ([b259d58](https://github.com/sabertazimi/boilerplate/commit/b259d587880b0569c3ab9050a7a9871f3f7a04e0))
340
+ * **webpack:** use tsconfig paths as resolve alias ([48b1861](https://github.com/sabertazimi/boilerplate/commit/48b18614dd0cd6a66ffde4d9d204707627b060bc))
341
+
342
+ ## [1.0.3](https://github.com/sabertazimi/boilerplate/compare/v1.0.2...v1.0.3) (2021-08-02)
343
+
344
+
345
+ ### Building Work
346
+
347
+ * **deps-dev:** bump webpack from 5.47.1 to 5.48.0 ([852c24c](https://github.com/sabertazimi/boilerplate/commit/852c24c648d40e4cec8c93626f5926a7e324e966))
348
+
349
+ ## [1.0.2](https://github.com/sabertazimi/boilerplate/compare/v1.0.1...v1.0.2) (2021-08-02)
350
+
351
+
352
+ ### Bug Fixes
353
+
354
+ * **release:** tag with signature ([5737247](https://github.com/sabertazimi/boilerplate/commit/57372479629ee41749bbae849ac36bcd4885685d))
355
+
356
+ ## [1.0.1](https://github.com/sabertazimi/boilerplate/compare/v1.0.0...v1.0.1) (2021-08-02)
357
+
358
+
359
+ ### Bug Fixes
360
+
361
+ * **index:** rename index.js to index.ts ([7d5f04f](https://github.com/sabertazimi/boilerplate/commit/7d5f04f228e63ba61bd311b3bea3aefd837f269d))
362
+
363
+
364
+ ### Building Work
365
+
366
+ * **CHANGELOG:** add more fields to CHANGELOG ([f76a1b1](https://github.com/sabertazimi/boilerplate/commit/f76a1b1ee92811536967402d3ab651b83b828847))
367
+ * **deps-dev:** bump @babel/preset-env from 7.14.8 to 7.14.9 ([1bcc570](https://github.com/sabertazimi/boilerplate/commit/1bcc570eca7b5a6c082139221d0ff6559de41797))
368
+ * **deps-dev:** bump @typescript-eslint/eslint-plugin ([0189069](https://github.com/sabertazimi/boilerplate/commit/0189069a784d1561c097be759308e8fc60d258f5))
369
+ * **deps-dev:** bump @typescript-eslint/parser from 4.28.4 to 4.28.5 ([0c494be](https://github.com/sabertazimi/boilerplate/commit/0c494bebf8cebc66bc8240f1e6ee1fd322ed9e20))
370
+ * **deps-dev:** bump eslint from 7.31.0 to 7.32.0 ([18d8d4e](https://github.com/sabertazimi/boilerplate/commit/18d8d4efaed6b4d2cde37612ca2be7664bbb37c2))
371
+ * **deps-dev:** bump webpack from 5.46.0 to 5.47.1 ([865e7b2](https://github.com/sabertazimi/boilerplate/commit/865e7b2245ca8b1293b579ea8efc50aefd610b15))
372
+
373
+ # 1.0.0 (2021-08-01)
374
+
375
+
376
+ ### Features
377
+
378
+ * **release:** add standard-version support ([ac99bb0](https://github.com/sabertazimi/boilerplate/commit/ac99bb00ea6146db79d2d3bbdd6febc45da56362))
379
+
380
+
381
+ ### Bug Fixes
382
+
383
+ * **css:** rectify font-stack variable ([9bc4b7f](https://github.com/sabertazimi/boilerplate/commit/9bc4b7fde1e2884c7085d47f80fe9f63a86c584a))
384
+ * **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;