Skip to content

Commit

Permalink
Merge pull request #191 from jorrit/yarn
Browse files Browse the repository at this point in the history
Update documentation and example for yarn
  • Loading branch information
neptunian authored Jan 29, 2018
2 parents 34924d2 + dc88ce0 commit 45d11e5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9,901 deletions.
5 changes: 3 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ Before you open a PR:
* If you're planning to add or change a major feature in a PR, please ensure
the change is aligned with the project roadmap by opening an issue first,
especially if you're going to spend a lot of time on it.
* In development, run `npm start` to build (+watch) the project source, and run
* In development, run `yarn start` to build (+watch) the project source, and run
the [development server](http://localhost:8000).
* Please ensure all the examples work correctly after your change. If you're
adding a major new use-case, add a new example demonstrating its use.
* Please **DO NOT** commit the build files. Make sure **ONLY** your changes to
`/src/` and `/examples/src` are included in your PR.
* Be careful to follow the code style of the project. Run `npm run lint` after
* Be careful to follow the code style of the project. Run `yarn run lint` after
your changes and ensure you do not introduce any new errors or warnings.
* All new features and changes need documentation.
* Make sure yarn.lock is updated when you add or upgrade dependencies.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

**Checks:**

- [ ] Please confirm `npm run lint` ran successfully
- [ ] Please confirm `yarn run lint` ran successfully
- [ ] Please confirm that only `/src` and `/examples/src` are committed
- [ ] [if new feature] Please confirm that documentation was added to the README.md
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ A simple, responsive lightbox component for displaying an array of images.
```bash
npm install --save react-images
```
or
```bash
yarn add react-images
```

```jsx
import React from 'react';
Expand Down Expand Up @@ -41,8 +45,8 @@ Live demo: [jossmac.github.io/react-images](http://jossmac.github.io/react-image
To build the examples locally, run:

```
npm install
npm start
yarn install
yarn start
```

Then open [`localhost:8000`](http://localhost:8000) in a browser.
Expand Down Expand Up @@ -89,7 +93,7 @@ closeButtonTitle | string | ' Close (Esc) ' | Customize close esc title
enableKeyboardInput | bool | true | Supports keyboard input - <code>esc</code>, <code>arrow left</code>, and <code>arrow right</code>
currentImage | number | 0 | The index of the image to display initially
customControls | array | undefined | An array of elements to display as custom controls on the top of lightbox
images | array | undefined | Required. Array of image objects See image options table below
images | array | undefined | Required. Array of image objects See image options table below
imageCountSeparator | String | ' of ' | Customize separator in the image count
isOpen | bool | false | Whether or not the lightbox is displayed
leftArrowTitle | string | ' Previous (Left arrow key) ' | Customize of left arrow title
Expand Down
4 changes: 3 additions & 1 deletion examples/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ <h2>Examples</h2>

<section id="getting-started" class="section-getting-started">
<h2>Getting Started</h2>
<p>1. Install using npm:</p>
<p>1. Install using yarn:</p>
<pre>yarn add react-images</pre>
<p>… or npm:</p>
<pre>npm install react-images --save</pre>
<p>2. Example usage with JSX:</p>
<pre><code>&lt;Lightbox
Expand Down
Loading

0 comments on commit 45d11e5

Please sign in to comment.