Skip to content

Commit e9e1cc1

Browse files
committed
Adding CONTRIBUTING.md
1 parent f991f02 commit e9e1cc1

File tree

2 files changed

+56
-10
lines changed

2 files changed

+56
-10
lines changed

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing
2+
3+
Found a bug? Want a new feature? Don't like the docs? Please send a pull request or raise an issue.
4+
5+
6+
## Creating Pull Requests
7+
8+
Pull requests are always welcome. In order to send a Pull Request, you will need to setup your environment;
9+
10+
Fork and clone the repo:
11+
- `git clone git@github.com:leandrowd/react-responsive-carousel.git`
12+
13+
Install dependencies:
14+
- `npm install`
15+
16+
Start the dev server:
17+
- `npm start`
18+
19+
Open your favourite browser on `localhost:8000` - livereload will be enabled and tests will run on each change.
20+
21+
### Guidelines
22+
- Make sure your editor support [editorConfig](http://editorconfig.org/) so the code formatting is consistent;
23+
- Add a descriptive commit message;
24+
- Add tests to cover your changes;
25+
- If needed, add a story (storybook);
26+
- DO NOT change files in the /lib folder;
27+
28+
29+
## Raising issues
30+
When raising an issue, please add as much details as possible. Screenshots, video recordings, or anything else that can make it easier to reproduce the bug you are reporting.
31+
32+
* A new option is to create a code pen with the code that causes the bug. Fork this [base pen](https://codepen.io/leandrowd/pen/xLvOPd) and add your code there. Don't forget to save and add the link for the pen to the issue.
33+

README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,22 @@ Powerful, lightweight and fully customizable carousel component for React apps.
2929

3030
Check it out these [cool demos](http://react-responsive-carousel.js.org/storybook/) created using [storybook](https://getstorybook.io/). The source code for each example is available [here](https://github.com/leandrowd/react-responsive-carousel/blob/master/stories/index.js)
3131

32+
Customize it yourself <https://codepen.io/leandrowd/pen/xLvOPd>
33+
3234
### Installing as a package
3335
`npm install react-responsive-carousel --save`
3436

3537
### Usage
3638

3739
```javascript
38-
var React = require('react');
39-
var ReactDOM = require('react-dom');
40-
var Carousel = require('react-responsive-carousel').Carousel;
40+
import React from 'react';
41+
import ReactDOM from 'react-dom';
42+
import { Carousel } from 'react-responsive-carousel');
4143

42-
var DemoCarousel = React.createClass({
44+
class DemoCarousel extends Component {
4345
render() {
4446
return (
45-
<Carousel axis="horizontal|vertical" showThumbs={true|false} showArrows={true|false} onChange={onChange} onClickItem={onClickItem} onClickThumb={onClickThumb} dynamicHeight emulateTouch>
47+
<Carousel>
4648
<div>
4749
<img src="assets/1.jpeg" />
4850
<p className="legend">Legend 1</p>
@@ -59,6 +61,7 @@ var DemoCarousel = React.createClass({
5961
);
6062
}
6163
});
64+
6265
ReactDOM.render(<DemoCarousel />, document.querySelector('.demo-carousel'));
6366

6467
// Don't forget to include the css in your page
@@ -98,10 +101,14 @@ ReactDOM.render(<DemoCarousel />, document.querySelector('.demo-carousel'));
98101
=======================
99102

100103
### Contributing
101-
Feel free to submit a PR or raise issues. When submitting a PR, please:
102-
- add the required tests and an example of usage to `stories/index.js`
103-
- don't submit changes to the `/lib` folder as it will be generated again after the merge.
104-
- ensure you have the editorConfig plugin or the same code style settings as defined in `.editorConfig` to avoid excess of spaces in diffs
104+
Check the [contributing guide](https://github.com/leandrowd/react-responsive-carousel/blob/master/CONTRIBUTING.md)
105+
106+
=======================
107+
108+
### Raising issues
109+
When raising an issue, please add as much details as possible. Screenshots, video recordings, or anything else that can make it easier to reproduce the bug you are reporting.
110+
111+
* A new option is to create a code pen with the code that causes the bug. Fork this [base pen](https://codepen.io/leandrowd/pen/xLvOPd) and add your code there. Don't forget to save and add the link for the pen to the issue.
105112

106113
=======================
107114

@@ -138,6 +145,12 @@ Feel free to submit a PR or raise issues. When submitting a PR, please:
138145
#### Storybook
139146
<http://react-responsive-carousel.js.org/storybook/>
140147

148+
#### Codepen
149+
<https://codepen.io/leandrowd/pen/xLvOPd>
150+
141151
=======================
142152

143-
[CHANGELOG](https://github.com/leandrowd/react-responsive-carousel/blob/master/CHANGELOG.md) - [TROUBLESHOOTING](https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md)
153+
Quick reads:
154+
- [CHANGELOG](https://github.com/leandrowd/react-responsive-carousel/blob/master/CHANGELOG.md)
155+
- [TROUBLESHOOTING](https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md)
156+
- [CONTRIBUTING](https://github.com/leandrowd/react-responsive-carousel/blob/master/CONTRIBUTING.md)

0 commit comments

Comments
 (0)