Skip to content

Commit 5f83cca

Browse files
authored
Update README.md
Add instructions to enable husky git hooks
1 parent 892c357 commit 5f83cca

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,21 @@ A simple basic template to start a new React Native app with ESLint and custom s
1212

1313
Create a new project passing a template:
1414

15-
```
15+
```sh
1616
react-native init [ProjectName] --template basic-app
1717
```
1818

1919
Wait for download dependencies.
2020

21+
### Install Husky git hooks
22+
23+
Git hooks is not installed by default, because when start a new React Native app, you don't have a git repository started.
24+
To fix this, first init git repo with `git init .` inside you [ProjectName] dir and after this run on terminal:
25+
26+
```sh
27+
node node_modules/husky/lib/installer/bin install
28+
```
29+
2130
### Finish installation
2231

2332
Run `node setup.js` to inject custom scripts and remove unnecessary files.
@@ -77,7 +86,7 @@ Clone this repo with `git clone https://github.com/lucianomlima/react-native-tem
7786

7887
To execute the project with your changes, you can use the absolute path of cloned repo with `react-native-cli`:
7988

80-
```
89+
```sh
8190
react-native init [PROJECT_NAME] --template file:///path/to/repo
8291
```
8392

0 commit comments

Comments
 (0)