File tree Expand file tree Collapse file tree 1 file changed +22
-10
lines changed Expand file tree Collapse file tree 1 file changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -18,23 +18,35 @@ react-native init [ProjectName] --template basic-app
18
18
19
19
Wait for download dependencies.
20
20
21
- ### Husky git hooks
21
+ ### Finish installation
22
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 App dir and after this run:
23
+ Run ` node setup.js ` to inject custom scripts and remove unnecessary files.
25
24
26
- ```
27
- node node_modules/husky/lib/installer/bin install
28
- ```
25
+ #### For VSCode users
29
26
30
- ### React Native < v0.57.0
31
- Finish install with:
27
+ If you use Path Intellisense extension add the following to ` settings.json ` :
32
28
29
+ ``` json
30
+ "path-intellisense.mappings" : {
31
+ "~" : " ${workspaceRoot}/src"
32
+ }
33
33
```
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'
35
42
```
36
43
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
+ ```
38
50
39
51
## Includes
40
52
You can’t perform that action at this time.
0 commit comments