Skip to content

Commit

Permalink
chore: Use Lefthook instead of Husky and lint-staged (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-yakuza authored Apr 21, 2022
1 parent af9d0e6 commit bf2ce53
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 969 deletions.
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# react-native-image-modal

react-native-image-modal is a simple full size modal image for iOS and Android.
`react-native-image-modal` is a simple full size modal image for iOS and Android.

You can pinch zoom-in/out, double-tap zoom-in/out, move and swipe-to-dismiss.
It supports react version >= 0.60 and <= 0.59.

## Document

Expand Down Expand Up @@ -43,7 +42,7 @@ npm install --save react-native-fast-image
npx pod-install
```

And then execute the command to install react-native-image-modal.
And then execute the command to install `react-native-image-modal`.

```bash
npm install --save react-native-image-modal
Expand Down Expand Up @@ -78,7 +77,7 @@ return (
## Properties

You can use All props of React Native Image for the original image(not full size modal image).
Below are react-native-image-modal specific properties.
Below are `react-native-image-modal` specific properties.

| Prop | required | Type | Description |
| ------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
Expand Down Expand Up @@ -109,23 +108,23 @@ Below are react-native-image-modal specific properties.

## Demo

- Open and close the image modal
- Open and close the image modal.

![open and close image modal](demo/open-and-close-image-modal.gif)

- pinch zoom in/out and move
- Pinch zoom in/out and move.

![pinch zoom in/out and move](demo/pinch-zoom-and-move.gif)

- double tap zoom in/out
- Double tap zoom in/out.

![double tap zoom in/out](demo/double-tap-zoom.gif)

- swipe to dismiss
- Swipe to dismiss.

![swipe to dismiss](demo/swipe-to-dismiss.gif)

- customize the component with the close button
- Customize the component with the close button.

![customize the component](demo/custom-button.png)

Expand All @@ -150,7 +149,7 @@ cd ios
pod install
```

Execute the example project
Execute the example project.

```bash
# Example folder
Expand All @@ -164,16 +163,22 @@ npm run android

You can follow below to contribute react-native-image-modal.

Clone the repository
Clone the repository.

```bash
git clone https://github.com/dev-yakuza/react-native-image-modal.git
```

Execute the typescript via npm script
Install libraries and `Lefthook`.

```bash
npm install
npx @arkweid/lefthook install
```

Execute the following command to start the project.

```bash
npm start
```

Expand Down
9 changes: 9 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pre-commit:
parallel: true
commands:
pretty:
glob: './src/**'
run: npx prettier --check {staged_files}
linter:
glob: 'src/**/*.{ts,tsx}'
run: npx eslint {staged_files}
Loading

0 comments on commit bf2ce53

Please sign in to comment.