Skip to content

Commit 94dbd45

Browse files
authored
Add CONTRIBUTING.md (#83)
1 parent 889545c commit 94dbd45

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

CONTRIBUTING.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contributing
2+
3+
The required coding standards represent the best practices for enabling a consistent code style across the team. As the way we work evolves over time, our coding standards likewise need to evolve.
4+
5+
## Rule Changes
6+
7+
For changing or adding rules please start a new issue and/or submit a pull request for discussion.
8+
9+
## Releasing
10+
11+
All notable changes to this project must be documented in the [CHANGELOG.md](CHANGELOG.md) file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
12+
13+
The project consists of one PHP package (published on [packagist.org](https://packagist.org/users/wearerequired/)) and two JavaScript packages (published on [npmjs.com](https://www.npmjs.com/org/wearerequired)). All packages must be published with the same version.
14+
For dependent package management this project uses [Lerna](https://lerna.js.org/).
15+
16+
### Releasing Packages
17+
18+
If you haven't yet, run `npm install`.
19+
20+
Lerna automatically releases all outdated packages. To check which packages are outdated and will be released, type `npm run publish:check`.
21+
22+
If you have the ability to publish packages, you must have [2FA enabled](https://docs.npmjs.com/about-two-factor-authentication). Confirm that you're logged in to npm, by running `npm whoami`. If you're not logged in, run `npm adduser` to login.
23+
24+
#### Development Release
25+
26+
Run the following command to release a dev version of the outdated packages.
27+
28+
```shell
29+
npm run publish:dev
30+
```
31+
32+
Lerna will ask you which version number you want to choose for all packages. For a `dev` release, you'll more likely want to choose the "prerelease" option.
33+
34+
Lerna will then publish to npm, commit the `package.json` changes and create the git tags.
35+
36+
**Note**: If Lerna doesn't detect any changes since only the PHP package was updated use `--force-publish`.
37+
38+
```shell
39+
npm run publish:dev -- --force-publish
40+
```
41+
42+
#### Production Release
43+
44+
To release a production version for the outdated packages, run the following command:
45+
46+
```shell
47+
npm run publish:prod
48+
```
49+
50+
Choose the correct version based on the [CHANGELOG.md](CHANGELOG.md) file, confirm your choices and let Lerna do its magic.

0 commit comments

Comments
 (0)