Skip to content

Commit eb2e32b

Browse files
chore: import development (#387)
1 parent e6c2b3c commit eb2e32b

28 files changed

+2195
-715
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ insert_final_newline = true
99
trim_trailing_whitespace = true
1010

1111
[*.md]
12-
insert_final_newline = false
12+
insert_final_newline = true
1313
trim_trailing_whitespace = false

.eslintrc

-15
This file was deleted.

.eslintrc.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
root: true,
3+
plugins: ['prettier'],
4+
extends: ['@webpack-contrib/eslint-config-webpack'],
5+
parserOptions: {
6+
sourceType: 'script',
7+
},
8+
rules: {
9+
'prettier/prettier': ['error'],
10+
strict: ['error', 'safe'],
11+
},
12+
};

.gitignore

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
.nyc_output
2-
node_modules
3-
coverage
4-
*.lcov
1+
/node_modules
2+
.idea/
3+
/coverage
4+
logs
5+
*.log
6+
npm-debug.log*
7+
.eslintcache
8+
/dist
9+
/local
10+
/reports
11+
.DS_Store
12+
Thumbs.db
13+
.idea
14+
*.iml
15+
.vscode
16+
*.sublime-project
17+
*.sublime-workspace

CONTRIBUTING.md

+121-29
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,135 @@
1-
# Welcome!
2-
:heart: Thanks for your interest and time in contributing to this project.
1+
# Contributing in @webpack-contrib
32

4-
## What We Use
3+
We'd always love contributions to further improve the webpack / webpack-contrib ecosystem!
4+
Here are the guidelines we'd like you to follow:
55

6-
- Building: [Webpack](https://webpack.js.org)
7-
- Linting: [ESLint](http://eslint.org/)
8-
- NPM: [NPM as a Build Tool](https://css-tricks.com/using-npm-build-tool/)
9-
- Testing: [Mocha](https://mochajs.org)
6+
- [Questions and Problems](#question)
7+
- [Issues and Bugs](#issue)
8+
- [Feature Requests](#feature)
9+
- [Pull Request Submission Guidelines](#submit-pr)
10+
- [Commit Message Conventions](#commit)
1011

11-
## Forking and Cloning
12+
## <a name="question"></a> Got a Question or Problem?
1213

13-
You'll need to first fork this repository, and then clone it locally before you
14-
can submit a Pull Request with your proposed changes.
14+
Please submit support requests and questions to StackOverflow using the tag [[webpack]](http://stackoverflow.com/tags/webpack).
15+
StackOverflow is better suited for this kind of support though you may also inquire in [Webpack Gitter](https://gitter.im/webpack/webpack).
16+
The issue tracker is for bug reports and feature discussions.
1517

16-
Please see the following articles for help getting started with git:
18+
## <a name="issue"></a> Found an Issue or Bug?
1719

18-
[Forking a Repository](https://help.github.com/articles/fork-a-repo/)
19-
[Cloning a Repository](https://help.github.com/articles/cloning-a-repository/)
20+
Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
2021

21-
## Pull Requests
22+
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we ask that you to provide a minimal reproduction scenario (github repo or failing test case). Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like:
2223

23-
Please lint and test your changes before submitting a Pull Request. You can lint your
24-
changes by running:
24+
- version of Webpack used
25+
- version of the loader / plugin you are creating a bug report for
26+
- the use-case that fails
2527

26-
```console
27-
$ npm run lint
28+
A minimal reproduce scenario allows us to quickly confirm a bug (or point out config problems) as well as confirm that we are fixing the right problem.
29+
30+
We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
31+
32+
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
33+
34+
## <a name="feature"></a> Feature Requests?
35+
36+
You can _request_ a new feature by creating an issue on Github.
37+
38+
If you would like to _implement_ a new feature, please submit an issue with a proposal for your work `first`, to be sure that particular makes sense for the project.
39+
40+
## <a name="submit-pr"></a> Pull Request Submission Guidelines
41+
42+
Before you submit your Pull Request (PR) consider the following guidelines:
43+
44+
- Search Github for an open or closed PR that relates to your submission. You don't want to duplicate effort.
45+
- Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages.
46+
- Fill out our `Pull Request Template`. Your pull request will not be considered if it is ignored.
47+
- Please sign the `Contributor License Agreement (CLA)` when a pull request is opened. We cannot accept your pull request without this. Make sure you sign with the primary email address associated with your local / github account.
48+
49+
### <a name="commit"></a> Webpack Contrib Commit Conventions
50+
51+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
52+
format that includes a **type**, a **scope** and a **subject**:
53+
54+
```
55+
<type>(<scope>): <subject>
56+
<BLANK LINE>
57+
<body>
58+
<BLANK LINE>
59+
<footer>
2860
```
2961

30-
You can test your changes against the test suite for this module by running:
62+
The **header** is mandatory and the **scope** of the header is optional.
63+
64+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
65+
to read on GitHub as well as in various git tools.
66+
67+
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
68+
69+
Examples:
3170

32-
```console
33-
$ npm run test
71+
```
72+
docs(readme): update install instructions
73+
```
74+
75+
```
76+
fix: refer to the `entrypoint` instead of the first `module`
3477
```
3578

36-
_Note: Please avoid committing `package-lock.json` files!_
79+
#### Revert
3780

38-
Please don't change variable or parameter names to match your personal
39-
preferences, unless the change is part of a refactor or significant modification
40-
of the codebase (which is very rare).
81+
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit.
82+
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
4183

42-
Please remember to thoroughly explain your Pull Request if it doesn't have an
43-
associated issue. If you're changing code significantly, please remember to add
44-
inline or block comments in the code as appropriate.
84+
#### Type
85+
86+
Must be one of the following:
87+
88+
- **build**: Changes that affect the build system or external dependencies (example scopes: babel, npm)
89+
- **chore**: Changes that fall outside of build / docs that do not effect source code (example scopes: package, defaults)
90+
- **ci**: Changes to our CI configuration files and scripts (example scopes: circleci, travis)
91+
- **docs**: Documentation only changes (example scopes: readme, changelog)
92+
- **feat**: A new feature
93+
- **fix**: A bug fix
94+
- **perf**: A code change that improves performance
95+
- **refactor**: A code change that neither fixes a bug nor adds a feature
96+
- **revert**: Used when reverting a committed change
97+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
98+
- **test**: Addition of or updates to Jest tests
99+
100+
#### Scope
101+
102+
The scope is subjective & depends on the `type` see above. A good example would be a change to a particular class / module.
103+
104+
#### Subject
105+
106+
The subject contains a succinct description of the change:
107+
108+
- use the imperative, present tense: "change" not "changed" nor "changes"
109+
- don't capitalize the first letter
110+
- no dot (.) at the end
111+
112+
#### Body
113+
114+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
115+
The body should include the motivation for the change and contrast this with previous behavior.
116+
117+
#### Footer
118+
119+
The footer should contain any information about **Breaking Changes** and is also the place to
120+
reference GitHub issues that this commit **Closes**.
121+
122+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
123+
124+
Example
125+
126+
```
127+
BREAKING CHANGE: Updates to `Chunk.mapModules`.
128+
129+
This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
130+
Migration: see webpack/webpack#5225
131+
132+
```
45133

46134
## Testing Your Pull Request
47135

@@ -50,7 +138,11 @@ module. Thankfully, Github provides a means to do this. Add a dependency to the
50138
`package.json` for such a project as follows:
51139

52140
```json
53-
"webpack-dev-middleware": "webpack/webpack-dev-middleware#{id}/head"
141+
{
142+
"devDependencies": {
143+
"webpack-dev-middleware": "webpack/webpack-dev-middleware#{id}/head"
144+
}
145+
}
54146
```
55147

56148
Where `{id}` is the # ID of your Pull Request.

0 commit comments

Comments
 (0)