Skip to content

Commit ebe0a16

Browse files
Merge pull request #66 from stephencookdev/feature/contributing
Add a CONTRIBUTING.md file, and try to make contribution generally a …
2 parents 7d4550c + e5af024 commit ebe0a16

14 files changed

Lines changed: 50 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Contributing
2+
3+
Contributors are welcome to help out with this repository! 😊
4+
5+
Please follow this guide when raising issues, and contributing to the SMP repository.
6+
7+
## Raising an Issue
8+
9+
If you're raising an issue with SMP being incompatible with a particular webpack config, plugin, or loader - then please include reproduction steps.
10+
11+
The 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+
15+
SMP uses [Prettier](https://github.com/prettier/prettier) for its code formatting.
16+
17+
If 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+
21+
SMP has 2 primary parts:
22+
23+
1. 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.
24+
2. 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.

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
<a href="https://travis-ci.org/stephencookdev/speed-measure-webpack-plugin"><img src="https://travis-ci.org/stephencookdev/speed-measure-webpack-plugin.svg?branch=master" /></a>
99
<a href="https://npmjs.com/package/speed-measure-webpack-plugin"><img src="https://img.shields.io/npm/dw/speed-measure-webpack-plugin.svg" /></a>
10-
<a href="https://npmjs.com/package/speed-measure-webpack-plugin"><img src="https://img.shields.io/node/v/speed-measure-webpack-plugin.svg" /></a>
10+
<a href="https://npmmjs.com/package/speed-measure-webpack-plugin"><img src="https://img.shields.io/node/v/speed-measure-webpack-plugin.svg" /></a>
11+
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg" /></a>
1112
</div>
1213
<br>
1314

@@ -29,10 +30,6 @@ or
2930
yarn add -D speed-measure-webpack-plugin
3031
```
3132

32-
## Migrating
33-
34-
SMP follows [semver](https://semver.org/). If upgrading a major version, you can consult [the migration guide](./migration.md).
35-
3633
## Requirements
3734

3835
SMP requires at least **Node v6**. But otherwise, accepts **all webpack** versions (1, 2, 3, and 4).
@@ -144,6 +141,16 @@ This flag is _experimental_. Some loaders will have inaccurate results:
144141

145142
We will find solutions to these issues before removing the _(experimental)_ flag on this option.
146143

144+
## Contributing
145+
146+
Contributors are welcome! 😊
147+
148+
Please check out the [CONTRIBUTING.md](./CONTRIBUTING.md).
149+
150+
## Migrating
151+
152+
SMP follows [semver](https://semver.org/). If upgrading a major version, you can consult [the migration guide](./migration.md).
153+
147154
## License
148155

149156
[MIT](/LICENSE)

__tests__/setups/v1-plain/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"description": "Test webpack v1 with SMP",
55
"scripts": {
6+
"full-test": "npm run prepare && npm run test && npm run cleanup",
67
"prepare": "cp -r ../../common/* .",
78
"test": "jest ./smp.test.js",
89
"cleanup": "rm -rf dist",

__tests__/setups/v2-plain/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"description": "Test webpack v2 with SMP",
55
"scripts": {
6+
"full-test": "npm run prepare && npm run test && npm run cleanup",
67
"prepare": "cp -r ../../common/* .",
78
"test": "jest ./smp.test.js",
89
"cleanup": "rm -rf dist",

__tests__/setups/v3-circular-plugin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"description": "Test webpack v3 and a plugin with circular references, with SMP",
55
"scripts": {
6+
"full-test": "npm run prepare && npm run test && npm run cleanup",
67
"prepare": "cp -r ../../common/* .",
78
"test": "jest ./smp.test.js",
89
"cleanup": "rm -rf dist",

__tests__/setups/v3-hard-source-webpack-plugin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"description": "Test webpack v3, and HardSourceWebpackPlugin with SMP",
55
"scripts": {
6+
"full-test": "npm run prepare && npm run test && npm run cleanup",
67
"prepare": "cp -r ../../common/* .",
78
"test": "jest ./smp.test.js",
89
"cleanup": "rm -rf dist && rm -rf node_modules/.cache",

__tests__/setups/v3-plain/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"description": "Test webpack v3 with SMP",
55
"scripts": {
6+
"full-test": "npm run prepare && npm run test && npm run cleanup",
67
"prepare": "cp -r ../../common/* .",
78
"test": "jest ./smp.test.js",
89
"cleanup": "rm -rf dist",

__tests__/setups/v3-stats/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"description": "Test webpack v3 with a StatsPlugin set-up with SMP",
55
"scripts": {
6+
"full-test": "npm run prepare && npm run test && npm run cleanup",
67
"prepare": "cp -r ../../common/* .",
78
"test": "jest ./smp.test.js",
89
"cleanup": "rm -rf dist",

__tests__/setups/v4-circular-plugin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"description": "Test webpack v4 and a plugin with circular references, with SMP",
55
"scripts": {
6+
"full-test": "npm run prepare && npm run test && npm run cleanup",
67
"prepare": "cp -r ../../common/* .",
78
"test": "jest ./smp.test.js",
89
"cleanup": "rm -rf dist",

__tests__/setups/v4-hard-source-webpack-plugin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"description": "Test webpack v4, and HardSourceWebpackPlugin with SMP",
55
"scripts": {
6+
"full-test": "npm run prepare && npm run test && npm run cleanup",
67
"prepare": "cp -r ../../common/* .",
78
"test": "jest ./smp.test.js",
89
"cleanup": "rm -rf dist && rm -rf node_modules/.cache",

0 commit comments

Comments
 (0)