Skip to content

Commit 13bc12c

Browse files
committed
Update finish setup instructions
1 parent 40315cc commit 13bc12c

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

README.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,35 @@ react-native init [ProjectName] --template basic-app
1818

1919
Wait for download dependencies.
2020

21-
### Husky git hooks
21+
### Finish installation
2222

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 App dir and after this run:
23+
Run `node setup.js` to inject custom scripts and remove unnecessary files.
2524

26-
```
27-
node node_modules/husky/lib/installer/bin install
28-
```
25+
#### For VSCode users
2926

30-
### React Native < v0.57.0
31-
Finish install with:
27+
If you use Path Intellisense extension add the following to `settings.json`:
3228

29+
```json
30+
"path-intellisense.mappings": {
31+
"~": "${workspaceRoot}/src"
32+
}
3333
```
34-
yarn start
34+
35+
#### Flow configuration
36+
37+
Open `.flowconfig` file. Go to the `[options]` section and find the line where is `module.name_mapper`.
38+
Add this to the next line:
39+
40+
```flow
41+
module.name_mapper='^~\/\(.*\)$' -> '<PROJECT_ROOT>/src/\1'
3542
```
3643

37-
To inject custom scripts and remove unnecessary files.
44+
It should look like the following:
45+
46+
```flow
47+
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
48+
module.name_mapper='^~\/\(.*\)$' -> '<PROJECT_ROOT>/src/\1'
49+
```
3850

3951
## Includes
4052

0 commit comments

Comments
 (0)