UNPKG

1.19 kBMarkdownView Raw
1# Contributing
2
3Contributors are welcome to help out with this repository! 😊
4
5Please follow this guide when raising issues, and contributing to the SMP repository.
6
7## Raising an Issue
8
9If you're raising an issue with SMP being incompatible with a particular webpack config, plugin, or loader - then please include reproduction steps.
10
11The ideal reproduction steps would be forking this repository, and adding a new [\_\_tests\_\_/setups](./__tests__/setups) test case.
12
13## Raising a Pull Request
14
15SMP uses [Prettier](https://github.com/prettier/prettier) for its code formatting.
16
17If possible, please also include a new unit test (e.g. [utils.test.js](./utils.test.js)), or integration test (i.e. [\_\_tests\_\_/setups](./__tests__/setups)).
18
19## Code Structure
20
21SMP has 2 primary parts:
22
231. The [SMP class](./index.js) contains the `smp.wrap` instance method that bootstraps the whole wrapping sequence. This class also listens for basic timing events, and orchestrates the main timings.
242. The [`WrappedPlugin`](./WrappedPlugin) proxy that wraps each webpack plugin. This uses a `Proxy` to wrap everything to do with a plugin, feeding the timing information back to the SMP class.