1
0
mirror of https://github.com/lancedikson/bowser synced 2024-09-28 22:30:44 +00:00
lancedikson_bowser/.github/CONTRIBUTING.md

43 lines
1.8 KiB
Markdown
Raw Normal View History

2018-08-18 11:13:50 +00:00
# Contributing
We're always open to pull requests or code reviews. Everyone can become a permanent contributor. Just ping @lancedikson in the issues or on Twitter ❤️
## Branches
2019-01-21 19:28:11 +00:00
The project runs Git-flow, where the `master` branch is for development and `production` is for production.
2018-08-18 11:13:50 +00:00
2019-01-21 19:28:11 +00:00
In a nutshell, if you are proposing a new feature that adds totally new functionality to `bowser`, it's better to branch from `master` and make a PR pointing back to `master` as well.
2019-01-21 19:28:11 +00:00
If it's a small hot-fix, an improvement to the docs, or added support for a new browser/OS/platform/etc, then it's better to branch from `production` and make a PR pointing back to `production`.
2019-01-21 19:28:11 +00:00
Following these simple rules will really help maintain the repo! Thanks ❤️
## Adding Browser Support and Tests
2019-01-21 19:28:11 +00:00
See the list in `test/acceptance/useragentstrings.yml` with example user agents and their expected `bowser` object.
Whenever you add support for new browsers or notice a bug / mismatch, please update the list and check if all tests are still passing. Also, make sure to keep the list of browser aliases up-to-date in `src/constants.js`.
For creating aliases, keep the following guidelines in mind:
- use only lowercase letters for names
- replace special characters such as space and dashes by underscore
- whenever possible drop the word `browser` from the original browser name
- always check for possible duplicates
2019-02-26 02:23:55 +00:00
- aliases are supposed to also be a shorter version of the original name
Examples:
`Opera Coast` --> `opera_coast`
`UC Browser` --> `uc`
`SeaMonkey` --> `seamonkey`
## Testing
2019-01-21 19:28:11 +00:00
If you'd like to contribute a change to `bowser`, modify the files in `src/`, and run the following (you'll need `node` + `npm` installed):
``` sh
$ npm install
$ npm run build #build
$ npm test #run tests
$ npm run lint #check lint rules
```