Skip to content

Commit 757738e

Browse files
committed
chore: configure release-it for publishing
1 parent 46d8841 commit 757738e

File tree

4 files changed

+2091
-43
lines changed

4 files changed

+2091
-43
lines changed

.release-it.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"increment": "conventional:angular",
3+
"scripts": {
4+
"changelog": "conventional-changelog -p angular | tail -n +3"
5+
},
6+
"git": {
7+
"commitMessage": "chore: release %s",
8+
"tagName": "v%s"
9+
},
10+
"npm": {
11+
"publish": true
12+
},
13+
"github": {
14+
"release": true
15+
}
16+
}

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,20 @@ class Example extends React.Component {
5656

5757
## Props
5858

59-
| name | required | default | description |
59+
| name | required | default | description |
6060
| ------------------------- | -------- | ------- | ------------|
6161
| snapPoints | yes | | E.g. `[300, 200, 0]`. Points for snapping of bottom sheet coomponent. They define distance from bottom of the screen. Might be number or percent (as string e.g. `'20%'`) for points or percents of screen height from bottom. |
6262
| initialSnap | no | 0 | Determines initial snap point of bottom sheet. The value is the index from snapPoints. |
6363
| renderContent | no | | Method for rendering scrollable content of bottom sheet. |
6464
| renderHeader | no | | Method for rendering non-scrollable header of bottom sheet. |
65-
| enabledGestureInteraction | no | `true` | Defines if bottom sheet could be scrollable by gesture. |
66-
| enabledManualSnapping | no | `true` | If `false` blocks snapping using `snapTo` method. |
65+
| enabledGestureInteraction | no | `true` | Defines if bottom sheet could be scrollable by gesture. |
66+
| enabledManualSnapping | no | `true` | If `false` blocks snapping using `snapTo` method. |
6767
| enabledInnerScrolling | no | `true` | Defines whether it's possible to scroll inner content of bottom sheet. |
6868
| callbackNode | no | | `reanimated` node which holds position of bottom sheet, where `0` it the highest snap point and `1` is the lowest. |
6969
| contentPosition | no | | `reanimated` node which holds position of bottom sheet's content (in dp) |
70-
| overdragResistanceFactor | no | 0 | `Defines how violently sheet has to stopped while overdragging. 0 means no overdrag |
71-
| springConfig | no | `{ }` | Overrides config for spring animation |
72-
| innerGestureHandlerRefs | no | | Refs for gesture handlers used for building bottom sheet. The array consists fo three refs. The first for PanGH used for inner content scrolling. The second for PanGH used for header. The third for TapGH used for stopping scrolling the content. |
70+
| overdragResistanceFactor | no | 0 | `Defines how violently sheet has to stopped while overdragging. 0 means no overdrag |
71+
| springConfig | no | `{ }` | Overrides config for spring animation |
72+
| innerGestureHandlerRefs | no | | Refs for gesture handlers used for building bottom sheet. The array consists fo three refs. The first for PanGH used for inner content scrolling. The second for PanGH used for header. The third for TapGH used for stopping scrolling the content. |
7373

7474

7575
## Methods
@@ -105,3 +105,15 @@ It's not finished and some work has to be done yet.
105105
2. Horizontal mode
106106
3. Deal with GH in inner scrollView
107107
4. Cleanup code (e.g. measuring of components)
108+
109+
## Contributing
110+
111+
### Publishing a release
112+
113+
We use [release-it](https://github.com/release-it/release-it) to automate our release. If you have publish access to the NPM package, run the following from the master branch to publish a new release:
114+
115+
```sh
116+
yarn release
117+
```
118+
119+
NOTE: You must have a `GITHUB_TOKEN` environment variable available. You can create a GitHub access token with the "repo" access [here](https://github.com/settings/tokens).

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"types": "reanimated-bottom-sheet.d.ts",
99
"scripts": {
1010
"test": "echo \"Error: no test specified\" && exit 1",
11+
"release": "release-it",
1112
"prepare": "bob build"
1213
},
1314
"keywords": [
@@ -40,10 +41,12 @@
4041
"@react-native-community/bob": "^0.3.3",
4142
"babel-eslint": "^10.0.1",
4243
"commitlint": "^7.5.2",
44+
"conventional-changelog-cli": "^2.0.12",
4345
"eslint": "^5.15.1",
4446
"eslint-plugin-react": "^7.12.4",
4547
"husky": "^1.3.1",
46-
"react-native-reanimated": "^1.0.0-alpha.12"
48+
"react-native-reanimated": "^1.0.0-alpha.12",
49+
"release-it": "^10.4.0"
4750
},
4851
"husky": {
4952
"hooks": {

0 commit comments

Comments
 (0)