Add templates for GitHub issues and pull requests

Also add CONTRIBUTING.md, which was originally a page in Wiki
This commit is contained in:
Hyunje Alex Jun 2016-02-22 23:02:06 +09:00
parent a2b2a77de1
commit 9580e08886
5 changed files with 93 additions and 13 deletions

8
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,8 @@
Make sure these boxes are checked before submitting your issue -- thank you!
- [ ] Check [FAQ](https://github.com/noraesae/perfect-scrollbar/wiki/FAQ)
- [ ] Search if there's already one reported in Issues
- [ ] Prepare a JSFiddle reproducing the issue
- Perfect Scrollbar JSFiddle: https://jsfiddle.net/DanielApt/xv0rrxv3/
- With jQuery: https://jsfiddle.net/DanielApt/gbfLazpx/
- [ ] Provide a page or source code where the issue can be checked

9
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,9 @@
Thank you very much for your contribution! Please make sure the followings
are checked.
- [ ] Read [CONTRIBUTING.md](../CONTRIBUTING.md)
- [ ] Run `gulp` to make sure it builds and lints successfully
- [ ] Provide the scenario this PR will address(some JSFiddles will be perfect)
- Perfect Scrollbar JSFiddle: https://jsfiddle.net/DanielApt/xv0rrxv3/
- With jQuery: https://jsfiddle.net/DanielApt/gbfLazpx/
- [ ] Refer to concerning issues if exist

View File

@ -5,5 +5,7 @@
/.travis.yml /.travis.yml
/gulpfile.js /gulpfile.js
/examples /examples
/CONTRIBUTING.md
/.github
node_modules node_modules

74
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,74 @@
# Contributing
I *really* welcome contributions! Please feel free to fork and issue pull requests when...
* You have a very nice idea to improve this plugin!
* You found a bug!
* You're good at English and can help my bad English!
For IE problems, please refer to [IE Support](https://github.com/noraesae/perfect-scrollbar#ie-support).
## Introduction
First of all, thank you in advance for your contribution!
This document will introduce something you should know before making some contributions to **perfect-scrollbar**. I'll try to explain as easy as possible. If there are something missed or not well-documented, please let me know.
Email: me@noraesae.net
## Directory Structure
Please don't edit files in the `out` subdirectory as they are generated via Gulp. You'll find source code in the `src` subdirectory!
`examples` directory is for the example sources. If you have any example you want to add with a new feature, please add it in the directory.
## Code Conventions
Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already.**
Basically, I try to follow [Douglas Crockford's JavaScript Code Conventions](http://javascript.crockford.com/code.html).
You can check if your code fits in the convention with `gulp lint`.
## Getting Started
First, ensure that you have the latest [Node.js](http://nodejs.org/) or [io.js](https://iojs.org) and [npm](http://npmjs.org) installed.
Test if Gulp CLI is installed by running `gulp --version`. If the command isn't found, run `npm install -g gulp`. For more information about installing Gulp, see the Gulp's [Getting Started](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md).
If `gulp` is installed, follow the steps below.
1. Fork and clone the repo.
1. Run `npm install` to install all dev dependencies.
1. Run `gulp` to check if Gulp works well.
Assuming that you don't see any error, you're ready to go.
## Linting Sources
You can use `gulp lint` command to lint the source files. If there're warnings with the command, it means that there are something that don't fit into the convention. Please modify the source to fit.
## Building Sources
You can use the `gulp build` command to build source files into output files.
If you want to watch the modification and build automatically during development, use the `gulp serve` command. It'll automatically rebuild the code when there's any change in it. It will also reload example pages, which is quite helpful.
## Submitting pull requests
1. Create a new branch. Working in your `master` branch is okay, but not recommended.
1. Modify the sources.
1. Run `gulp` to see if the code fit into the code convention and build without an error. Repeat steps 2-3 until done.
1. Update the documentation to reflect any changes.
1. Create examples if needed.
1. Push to your fork and submit a pull request.
For further information about pull requests, please refer to GitHub's [Using Pull Requests](https://help.github.com/articles/using-pull-requests).
## Code Review
When the pull request is created, anyone can review the source code. After the review is finished and the patch doesn't have any problem, it'll be merged.
## Conclusion
The process looks somewhat difficult, but it's necessary to avoid maintanance issues and make the code easy to read and use.
If there is any opinion or question, please feel free to contact me.
Email: me@noraesae.net

View File

@ -409,19 +409,6 @@ $(document).on('ps-scroll-x', function () {
}) })
``` ```
## Contribution
#### Please read [Contributing](https://github.com/noraesae/perfect-scrollbar/wiki/Contributing) in the wiki before making any contribution.
I *really* welcome contributions! Please feel free to fork and issue pull requests when...
* You have a very nice idea to improve this plugin!
* You found a bug!
* You're good at English and can help my bad English!
For IE problems, please refer to [IE Support](https://github.com/noraesae/perfect-scrollbar#ie-support).
## IE Support ## IE Support
The plugin is designed to work in modern browsers, including the very latest The plugin is designed to work in modern browsers, including the very latest