53
53
* [NativeScript-Vue Usage Sample](#nativescript-vue-usage-sample)
54
54
* [ Demos] ( #demos )
55
55
* [ Demos and Development] ( #demos-and-development )
56
- * [Setup](#setup)
56
+ * [Repo Setup](#repo- setup)
57
57
* [Build](#build)
58
58
* [Demos](#demos-1)
59
+ * [ Contributing] ( #contributing )
60
+ * [Update repo ](#update-repo-)
61
+ * [Update readme ](#update-readme-)
62
+ * [Update doc ](#update-doc-)
63
+ * [Publish](#publish)
64
+ * [modifying submodules](#modifying-submodules)
59
65
* [ Questions] ( #questions )
60
66
61
67
@@ -233,18 +239,18 @@ $ ns run ios|android
233
239
## Demos and Development
234
240
235
241
236
- ### Setup
237
-
238
- To run the demos, you must clone this repo ** recursively** .
242
+ ### Repo Setup
239
243
244
+ The repo uses submodules. If you did not clone with ` --recursive ` then you need to call
240
245
```
241
- git clone https://github.com/@nativescript-community/ui-checkbox.git --recursive
246
+ git submodule update --init
242
247
```
243
248
244
- ** Install Dependencies:**
245
- ``` bash
246
- npm i # or 'yarn install' or 'pnpm install'
247
- ```
249
+ The package manager used to install and link dependencies must be ` pnpm ` or ` yarn ` . ` npm ` wont work.
250
+
251
+ To develop and test:
252
+ if you use ` yarn ` then run ` yarn `
253
+ if you use ` pnpm ` then run ` pnpm i `
248
254
249
255
** Interactive Menu:**
250
256
@@ -253,10 +259,9 @@ To start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`)
253
259
### Build
254
260
255
261
``` bash
256
- npm run build
257
-
258
- npm run build.angular # or for Angular
262
+ npm run build.all
259
263
```
264
+ 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 `
260
265
261
266
### Demos
262
267
@@ -265,6 +270,61 @@ npm run demo.[ng|react|svelte|vue].[ios|android]
265
270
266
271
npm run demo.svelte.ios # Example
267
272
```
273
+
274
+ 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] `
275
+ Instead you work in ` demo-snippets/[ng|react|svelte|vue] `
276
+ You can start from the ` install.ts ` of each flavor to see how to register new demos
277
+
278
+
279
+ [ ] ( #contributing )
280
+
281
+ ## Contributing
282
+
283
+ ### Update repo
284
+
285
+ You can update the repo files quite easily
286
+
287
+ First update the submodules
288
+
289
+ ``` bash
290
+ npm run update
291
+ ```
292
+
293
+ Then commit the changes
294
+ Then update common files
295
+
296
+ ``` bash
297
+ npm run sync
298
+ ```
299
+ Then you can run ` yarn|pnpm ` , commit changed files if any
300
+
301
+ ### Update readme
302
+ ``` bash
303
+ npm run readme
304
+ ```
305
+
306
+ ### Update doc
307
+ ``` bash
308
+ npm run doc
309
+ ```
310
+
311
+ ### Publish
312
+
313
+ The publishing is completely handled by ` lerna ` (you can add ` -- --bump major ` to force a major release)
314
+ Simply run
315
+ ``` shell
316
+ npm run publish
317
+ ```
318
+
319
+ ### modifying submodules
320
+
321
+ The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
322
+ One easy solution is t modify ` ~/.gitconfig ` and add
323
+ ```
324
+
325
+ pushInsteadOf = https://github.com/
326
+ ```
327
+
268
328
269
329
[ ] ( #questions )
270
330
0 commit comments