Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Commit c93f128

Browse files
committed
Regenerate README
1 parent 110b10f commit c93f128

File tree

1 file changed

+53
-9
lines changed

1 file changed

+53
-9
lines changed

README.md

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@ Accessible, extensible, Autocomplete for React.js.
44

55
[Examples](https://reactcommunity.org/react-autocomplete/)
66

7+
## Install
8+
9+
### npm
10+
11+
```bash
12+
npm install --save react-autocomplete
13+
```
14+
15+
### yarn
16+
17+
```bash
18+
yarn add react-autocomplete
19+
```
20+
21+
### AMD/UMD
22+
23+
* Development: [https://unpkg.com/[email protected]/dist/react-autocomplete.js](https://unpkg.com/[email protected]/dist/react-autocomplete.js)
24+
* Production: [https://unpkg.com/[email protected]/dist/react-autocomplete.min.js](https://unpkg.com/[email protected]/dist/react-autocomplete.min.js)
25+
726
## API
827

928
### `getItemValue: Function`
@@ -135,6 +154,9 @@ will win if it contains a `style` entry.
135154

136155

137156

157+
# Development
158+
You can start a local development environment with `npm start`. This command starts a static file server on [localhost:8080](http://localhost:8080) which serves the examples in `examples/`. Hot-reload mechanisms are in place which means you don't have to refresh the page or restart the build for changes to take effect.
159+
138160
## Tests!
139161

140162
Run them:
@@ -146,13 +168,35 @@ Write them:
146168
Check your work:
147169
`npm run coverage`
148170

149-
## Publishing / Releasing
171+
## Scripts
172+
Run with `npm run <script>`.
173+
174+
### gh-pages
175+
Builds the examples and assembles a commit which is pushed to `origin/gh-pages`, then cleans up your working directory. Note: This script will `git checkout master` before building.
176+
177+
### release
178+
Takes the same argument as `npm publish`, i.e. `[major|minor|patch|x.x.x]`, then tags a new version, publishes, and pushes the version commit and tag to `origin/master`. Usage: `npm run release -- [major|minor|patch|x.x.x]`. Remember to update the CHANGELOG before releasing!
179+
180+
### build
181+
Runs the build scripts detailed below.
182+
183+
### build:component
184+
Transpiles the source in `lib/` and outputs it to `build/`, as well as creating a UMD bundle in `dist/`.
185+
186+
### build:examples
187+
Creates bundles for each of the examples, which is used for pushing to `origin/gh-pages`.
188+
189+
### test
190+
Runs the test scripts detailed below.
191+
192+
### test:lint
193+
Runs `eslint` on the source.
194+
195+
### test:jest
196+
Runs the unit tests with `jest`.
197+
198+
### coverage
199+
Runs the unit tests and creates a code coverage report.
150200

151-
* `rackt build` (you probably need to temporarily delete/move `.babelrc`)
152-
* `npm run generate-readme`
153-
* `git commit README.md build/* dist/* -m 'Update build and dist files'`
154-
* Update `CHANGELOG.md`
155-
* `git commit CHANGELOG.md -m 'Update CHANGELOG with x.x.x release'`
156-
* `npm version x.x.x`
157-
* `npm publish`
158-
* `git push origin/master --follow-tags`
201+
### start
202+
Builds all the examples and starts a static file server on [localhost:8080](http://localhost:8080). Any changes made to `lib/Autocomplete.js` and the examples are automatically compiled and transmitted to the browser, i.e. there's no need to refresh the page or restart the build during development. This script is the perfect companion when making changes to this repo, since you can use the examples as a test-bed for development.

0 commit comments

Comments
 (0)