You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have any questions/issues/comments please feel free to create an issue or start a conversation in the [NativeScript Community Discord](https://nativescript.org/discord).
354
+
355
+
[](#demos-and-development)
356
+
357
+
## Demos and Development
358
+
359
+
360
+
### Repo Setup
361
+
362
+
The repo uses submodules. If you did not clone with ` --recursive` then you need to call
363
+
```
364
+
git submodule update --init
365
+
```
366
+
367
+
The package manager used to install and link dependencies must be `pnpm` or `yarn`. `npm` wont work.
368
+
369
+
To develop and test:
370
+
if you use `yarn` then run `yarn`
371
+
if you use `pnpm` then run `pnpm i`
372
+
373
+
**Interactive Menu:**
374
+
375
+
To start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`). This will list all of the commonly used scripts.
376
+
377
+
### Build
378
+
379
+
```bash
380
+
npm run build.all
381
+
```
382
+
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`
383
+
384
+
### Demos
385
+
386
+
```bash
387
+
npm run demo.[ng|react|svelte|vue].[ios|android]
388
+
389
+
npm run demo.svelte.ios # Example
390
+
```
391
+
392
+
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]`
393
+
Instead you work in `demo-snippets/[ng|react|svelte|vue]`
394
+
You can start from the `install.ts` of each flavor to see how to register new demos
395
+
396
+
397
+
[](#contributing)
398
+
399
+
## Contributing
400
+
401
+
### Update repo
402
+
403
+
You can update the repo files quite easily
404
+
405
+
First update the submodules
406
+
407
+
```bash
408
+
npm run update
409
+
```
410
+
411
+
Then commit the changes
412
+
Then update common files
413
+
414
+
```bash
415
+
npm run sync
416
+
```
417
+
Then you can run `yarn|pnpm`, commit changed files if any
418
+
419
+
### Update readme
420
+
```bash
421
+
npm run readme
422
+
```
423
+
424
+
### Update doc
425
+
```bash
426
+
npm run doc
427
+
```
428
+
429
+
### Publish
430
+
431
+
The publishing is completely handled by `lerna` (you can add `-- --bump major` to force a major release)
432
+
Simply run
433
+
```shell
434
+
npm run publish
435
+
```
436
+
437
+
### modifying submodules
438
+
439
+
The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
440
+
One easy solution is t modify `~/.gitconfig` and add
<pre><codeclass="language-bash"><spanclass="hl-1">npm run build.all</span>
430
437
</code></pre>
438
+
<p>WARNING: it seems <code>yarn build.all</code> wont always work (not finding binaries in <code>node_modules/.bin</code>) which is why the doc explicitly uses <code>npm run</code></p>
<pre><codeclass="language-bash"><spanclass="hl-1">npm run demo.[ng|react|svelte|vue].[ios|android]</span><br/><br/><spanclass="hl-1">npm run demo.svelte.ios </span><spanclass="hl-8"># Example</span>
436
444
</code></pre>
445
+
<p>Demo setup is a bit special in the sense that if you want to modify/add demos you dont work directly in <code>demo-[ng|react|svelte|vue]</code>
446
+
Instead you work in <code>demo-snippets/[ng|react|svelte|vue]</code>
447
+
You can start from the <code>install.ts</code> of each flavor to see how to register new demos </p>
437
448
<p><ahref="#contributing"></a></p>
438
449
<p><ahref="#contributing"></a></p>
439
450
@@ -473,13 +484,107 @@ <h3>Publish</h3>
473
484
Simply run </p>
474
485
<pre><codeclass="language-shell"><spanclass="hl-1">npm run publish</span>
<p>If you have any questions/issues/comments please feel free to create an issue or start a conversation in the <ahref="https://nativescript.org/discord">NativeScript Community Discord</a>.</p>
<p>The package manager used to install and link dependencies must be <code>pnpm</code> or <code>yarn</code>. <code>npm</code> wont work.</p>
515
+
<p>To develop and test:
516
+
if you use <code>yarn</code> then run <code>yarn</code>
517
+
if you use <code>pnpm</code> then run <code>pnpm i</code></p>
518
+
<p><strong>Interactive Menu:</strong></p>
519
+
<p>To start the interactive menu, run <code>npm start</code> (or <code>yarn start</code> or <code>pnpm start</code>). This will list all of the commonly used scripts.</p>
<pre><codeclass="language-bash"><spanclass="hl-1">npm run build.all</span>
525
+
</code></pre>
526
+
<p>WARNING: it seems <code>yarn build.all</code> wont always work (not finding binaries in <code>node_modules/.bin</code>) which is why the doc explicitly uses <code>npm run</code></p>
<pre><codeclass="language-bash"><spanclass="hl-1">npm run demo.[ng|react|svelte|vue].[ios|android]</span><br/><br/><spanclass="hl-1">npm run demo.svelte.ios </span><spanclass="hl-8"># Example</span>
532
+
</code></pre>
533
+
<p>Demo setup is a bit special in the sense that if you want to modify/add demos you dont work directly in <code>demo-[ng|react|svelte|vue]</code>
534
+
Instead you work in <code>demo-snippets/[ng|react|svelte|vue]</code>
535
+
You can start from the <code>install.ts</code> of each flavor to see how to register new demos </p>
<p>If you have any questions/issues/comments please feel free to create an issue or start a conversation in the <ahref="https://nativescript.org/discord">NativeScript Community Discord</a>.</p>
0 commit comments