Skip to content

Commit

Permalink
updated docs about release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Mar 3, 2018
1 parent f90dd50 commit 138ed0d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,23 @@ https://andreypopp.github.io/react-textarea-autosize/
### How to focus

Get a ref to inner textarea:

```js
<Textarea inputRef={(tag) => this.textarea = tag} />
<Textarea inputRef={tag => (this.textarea = tag)} />
```

And then call a focus on that ref:

```js
this.textarea.focus()
this.textarea.focus();
```

To autofocus:

```js
<Textarea autoFocus />
```

(all HTML attributes are passed to inner textarea)

### How to test it with jest and react-test-renderer
Expand Down Expand Up @@ -76,7 +81,7 @@ To release patch, minor or major version:
% npm run release:minor
% npm run release:major

This will run eslint, compile sources from `src/` to `lib/`, `es/` and `dist/`,
bump a version in `package.json` and then create a new git commit with tag. If
tests or linter fails — commit won't be created. If tasks succeed it publishes
to npm and pushes a tag to github.
This will run eslint, compile sources from `src/` to `dist/`, bump a version in
`package.json` and then create a new git commit with tag. If tests or linter
fails — commit won't be created. If tasks succeed it publishes to npm and
pushes a tag to github.

0 comments on commit 138ed0d

Please sign in to comment.