Skip to content

Commit a70ead7

Browse files
Merge pull request #67 from stephencookdev/release/v1.2.5
Release/v1.2.5
2 parents cb9a8e4 + 4aa224f commit a70ead7

26 files changed

Lines changed: 1518 additions & 3240 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-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__tests__/setups/v1-plain/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
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",
8-
"cleanup": "rm -rf dist"
9+
"cleanup": "rm -rf dist",
10+
"audit-fix": "npm audit fix"
911
},
1012
"license": "MIT",
1113
"engines": {

__tests__/setups/v2-plain/package-lock.json

Lines changed: 27 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

__tests__/setups/v2-plain/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
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",
8-
"cleanup": "rm -rf dist"
9+
"cleanup": "rm -rf dist",
10+
"audit-fix": "npm audit fix"
911
},
1012
"license": "MIT",
1113
"engines": {

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

Lines changed: 27 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
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",
8-
"cleanup": "rm -rf dist"
9+
"cleanup": "rm -rf dist",
10+
"audit-fix": "npm audit fix"
911
},
1012
"license": "MIT",
1113
"engines": {

0 commit comments

Comments
 (0)