Skip to content
This repository was archived by the owner on May 16, 2020. It is now read-only.

Commit 777358c

Browse files
chore: some minor changes and adding in contributing guidelines, changelog generation and pre commit hook
1 parent 6f87375 commit 777358c

File tree

5 files changed

+78
-3
lines changed

5 files changed

+78
-3
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ node_modules/
88
npm-debug.log
99

1010
# lerna debug log
11-
lerna-debug.log
11+
lerna-debug.log
12+
13+
# changelog directory
14+
.changelog

CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
So you want to contribute to ATLauncher? Well here are a few ways you can help make this project better!
3+
4+
## Branching structure
5+
When contributing please follow our branching structure when making a PR. Not following this will result in automatic
6+
closure of the PR.
7+
8+
Our branching structure is based on
9+
[Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
10+
11+
- **master** will always contain the code for the latest production release
12+
- **develop** will contain the latest beta version used for testing
13+
- **feature/*** will contain single issues being developed. Once developed they're merged into develop and tagged with
14+
a beta release version. They should be named 'feature/22-some-brief-description'
15+
- **release/*** will contain all the code from each feature branch that are going out in the next release and should
16+
all be merged into the branch. Once approved and tested it gets merged into master and tagged. They
17+
should be named 'release/4-1-1-release'
18+
- **hotfix/*** will contain hotfixes going to be merged directly into master then tagged. Hotfixes should only need to
19+
occur when there is a very critical bug in the current release that needs to be fixed ASAP. All hotfix
20+
branches should be branched off of master.
21+
22+
All tags are done on release of a beta or a production version and should be in format **v(version number)** and the
23+
version number being that of a semver number.
24+
25+
All develop releases should be tagged with **beta** versions. For instance **v4.1.1-beta.1.6** where the NPM package
26+
version would be **4.1.1-beta.1.6**. Alpha versions shouldn't be used.
27+
28+
Feature branches are deleted once in a release branch. Any issues that come up after the features branch has been merged
29+
nto a release branch should be resolved by creating a new feature branch off the release branch.
30+
31+
An example of a good name for a feature branch is say we have an issue (#44) which is about not being able to delete a
32+
pack. A good name for a feature branch would be `feature/44-unable-to-delete-packs` and go from there.
33+
34+
## Code styling
35+
When creating a PR all code you've committed will be linted against our defined ESLint rules. You can check if your code
36+
follows our standards by running the `npm run lint` command. More information about our ESLint rules can be found
37+
[here](https://github.com/ATLauncher/style-guide/tree/master/packages/eslint-config-atlauncher).
38+
39+
In short please note the following:
40+
41+
- All line lengths should be under 120 lines long.
42+
- 4 spaces in all files (other than json files which use 2 spaces).
43+
- Unix newlines should **ALWAYS** be used.
44+
- Single quotes should be used everywhere when possible except for JSON.
45+
- All code should contain correct JSDoc documentation.
46+
47+
## Testing
48+
All new code created should be properly tested with both unit and end to end tests where appropriate.
49+
50+
Please don't over test your code, we don't aim for complete code coverage and don't even use that as a metric, we simply
51+
want to make sure all code is tested for typical happy and sad paths, making sure as many use cases are accounted for.
52+
53+
## Discord
54+
If you wish to join our Discord channel please do so [here](https://atl.pw/discord). There is a channel specifically for
55+
NEXT discussion called **#atlauncher-next** which you can feel free to contribute to.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,12 @@ npm install --global lerna
5151
Then go ahead and run a `npm install` in this directory. This will bootstrap all the packages which will run a npm
5252
install and link and cross dependencies.
5353

54+
Then to get up and developing with the modules, simply run `npm run storybook:dev` which will start a server at
55+
`http://127.0.0.1:9001` with the storybook for the `ui-components` package.
56+
57+
To run the linter simply run `npm run lint` which will run the linter on all the packages.
58+
59+
To run tests on all the packages, simply run `npm run test`.
60+
5461
## Publishing
5562
TBD

lerna.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,13 @@
33
"packages": [
44
"packages/*"
55
],
6+
"changelog": {
7+
"repo": "ATLauncher/style-guide",
8+
"labels": {
9+
"bug": "Bug fix",
10+
"cleanup": "Housekeeping"
11+
},
12+
"cacheDir": ".changelog"
13+
},
614
"version": "independent"
715
}

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
{
22
"devDependencies": {
3+
"husky": "^0.13.3",
34
"lerna": "2.0.0-beta.38"
45
},
56
"scripts": {
67
"copy-common-files": "node scripts/copy-common-files.js",
78
"clean": "lerna run clean",
89
"lint": "lerna run lint",
910
"npm:prune": "lerna exec -- npm prune",
11+
"precommit": "npm run lint && npm run test",
1012
"postinstall": "lerna bootstrap",
11-
"storybook:dev": "lerna run --scope @atlauncher/ui-components storybook:dev",
12-
"storybook:publish": "lerna run --scope @atlauncher/ui-components storybook:publish",
13+
"storybook:dev": "lerna run --scope @atlauncher/ui-components storybook:dev --stream",
14+
"storybook:publish": "lerna run --scope @atlauncher/ui-components storybook:publish --stream",
1315
"test": "lerna run test"
1416
}
1517
}

0 commit comments

Comments
 (0)