91
91
* [hasFineLocationPermission / requestFineLocationPermission](#hasfinelocationpermission--requestfinelocationpermission)
92
92
* [ Using marker images from the internet] ( #using-marker-images-from-the-internet )
93
93
* [ Demos and Development] ( #demos-and-development )
94
- * [Setup](#setup)
94
+ * [Repo Setup](#repo- setup)
95
95
* [Build](#build)
96
96
* [Demos](#demos)
97
+ * [ Contributing] ( #contributing )
98
+ * [Update repo ](#update-repo-)
99
+ * [Update readme ](#update-readme-)
100
+ * [Update doc ](#update-doc-)
101
+ * [Publish](#publish)
102
+ * [modifying submodules](#modifying-submodules)
97
103
* [ Questions] ( #questions )
98
104
99
105
@@ -1054,18 +1060,18 @@ the domain. Google for iOS ATS for detailed options, but for a quick test you ca
1054
1060
## Demos and Development
1055
1061
1056
1062
1057
- ### Setup
1058
-
1059
- To run the demos, you must clone this repo **recursively**.
1063
+ ### Repo Setup
1060
1064
1065
+ The repo uses submodules. If you did not clone with ` -- recursive` then you need to call
1061
1066
` ` `
1062
- git clone https : // github.com/@nativescript-community/ui-mapbox.git --recursive
1067
+ git submodule update -- init
1063
1068
` ` `
1064
1069
1065
- **Install Dependencies:**
1066
- ` ` ` bash
1067
- npm i # or ' yarn install' or ' pnpm install'
1068
- ` ` `
1070
+ The package manager used to install and link dependencies must be ` pnpm` or ` yarn` . ` npm` wont work.
1071
+
1072
+ To develop and test:
1073
+ if you use ` yarn` then run ` yarn`
1074
+ if you use ` pnpm` then run ` pnpm i`
1069
1075
1070
1076
**Interactive Menu:**
1071
1077
@@ -1074,10 +1080,9 @@ To start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`)
1074
1080
### Build
1075
1081
1076
1082
` ` ` bash
1077
- npm run build
1078
-
1079
- npm run build .angular # or for Angular
1083
+ npm run build .all
1080
1084
` ` `
1085
+ WARNING: it seems ` yarn build .all ` wont always work (not finding binaries in ` node_modules/ .bin ` ) which is why the doc explicitly uses ` npm run`
1081
1086
1082
1087
### Demos
1083
1088
@@ -1086,6 +1091,61 @@ npm run demo.[ng|react|svelte|vue].[ios|android]
1086
1091
1087
1092
npm run demo .svelte .ios # Example
1088
1093
` ` `
1094
+
1095
+ Demo setup is a bit special in the sense that if you want to modify/add demos you dont work directly in ` demo- [ng| react| svelte| vue]`
1096
+ Instead you work in ` demo- snippets/ [ng| react| svelte| vue]`
1097
+ You can start from the ` install .ts ` of each flavor to see how to register new demos
1098
+
1099
+
1100
+ [](#contributing)
1101
+
1102
+ ## Contributing
1103
+
1104
+ ### Update repo
1105
+
1106
+ You can update the repo files quite easily
1107
+
1108
+ First update the submodules
1109
+
1110
+ ` ` ` bash
1111
+ npm run update
1112
+ ` ` `
1113
+
1114
+ Then commit the changes
1115
+ Then update common files
1116
+
1117
+ ` ` ` bash
1118
+ npm run sync
1119
+ ` ` `
1120
+ Then you can run ` yarn| pnpm` , commit changed files if any
1121
+
1122
+ ### Update readme
1123
+ ` ` ` bash
1124
+ npm run readme
1125
+ ` ` `
1126
+
1127
+ ### Update doc
1128
+ ` ` ` bash
1129
+ npm run doc
1130
+ ` ` `
1131
+
1132
+ ### Publish
1133
+
1134
+ The publishing is completely handled by ` lerna` (you can add ` -- -- bump major` to force a major release)
1135
+ Simply run
1136
+ ` ` ` shell
1137
+ npm run publish
1138
+ ` ` `
1139
+
1140
+ ### modifying submodules
1141
+
1142
+ The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
1143
+ One easy solution is t modify ` ~ / .gitconfig ` and add
1144
+ ` ` `
1145
+ [url " ssh://git@github.com/" ]
1146
+ pushInsteadOf = https: // github.com/
1147
+ ` ` `
1148
+
1089
1149
1090
1150
[](#questions)
1091
1151
0 commit comments