Skip to content

Commit 2c25c60

Browse files
committed
readme/doc
1 parent b41e3c2 commit 2c25c60

File tree

2 files changed

+187
-2
lines changed

2 files changed

+187
-2
lines changed

README.md

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,4 +763,101 @@ One easy solution is t modify `~/.gitconfig` and add
763763
## Questions
764764

765765
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).
766-
</details>
766+
</details>
767+
768+
[](#demos-and-development)
769+
770+
## Demos and Development
771+
772+
773+
### Repo Setup
774+
775+
The repo uses submodules. If you did not clone with ` --recursive` then you need to call
776+
```
777+
git submodule update --init
778+
```
779+
780+
The package manager used to install and link dependencies must be `pnpm` or `yarn`. `npm` wont work.
781+
782+
To develop and test:
783+
if you use `yarn` then run `yarn`
784+
if you use `pnpm` then run `pnpm i`
785+
786+
**Interactive Menu:**
787+
788+
To start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`). This will list all of the commonly used scripts.
789+
790+
### Build
791+
792+
```bash
793+
npm run build.all
794+
```
795+
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`
796+
797+
### Demos
798+
799+
```bash
800+
npm run demo.[ng|react|svelte|vue].[ios|android]
801+
802+
npm run demo.svelte.ios # Example
803+
```
804+
805+
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]`
806+
Instead you work in `demo-snippets/[ng|react|svelte|vue]`
807+
You can start from the `install.ts` of each flavor to see how to register new demos
808+
809+
810+
[](#contributing)
811+
812+
## Contributing
813+
814+
### Update repo
815+
816+
You can update the repo files quite easily
817+
818+
First update the submodules
819+
820+
```bash
821+
npm run update
822+
```
823+
824+
Then commit the changes
825+
Then update common files
826+
827+
```bash
828+
npm run sync
829+
```
830+
Then you can run `yarn|pnpm`, commit changed files if any
831+
832+
### Update readme
833+
```bash
834+
npm run readme
835+
```
836+
837+
### Update doc
838+
```bash
839+
npm run doc
840+
```
841+
842+
### Publish
843+
844+
The publishing is completely handled by `lerna` (you can add `-- --bump major` to force a major release)
845+
Simply run
846+
```shell
847+
npm run publish
848+
```
849+
850+
### modifying submodules
851+
852+
The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
853+
One easy solution is t modify `~/.gitconfig` and add
854+
```
855+
[url "ssh://[email protected]/"]
856+
pushInsteadOf = https://github.com/
857+
```
858+
859+
[](#questions)
860+
861+
## Questions
862+
863+
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).

docs/index.html

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,95 @@ <h3>modifying submodules</h3>
642642
<h2>Questions</h2>
643643
</a>
644644
<p>If you have any questions/issues/comments please feel free to create an issue or start a conversation in the <a href="https://nativescript.org/discord">NativeScript Community Discord</a>.</p>
645-
</details></div></div>
645+
</details>
646+
647+
<p><a href="#demos-and-development"></a></p>
648+
649+
<a href="#demos-and-development-2" id="demos-and-development-2" style="color: inherit; text-decoration: none;">
650+
<h2>Demos and Development</h2>
651+
</a>
652+
653+
<a href="#repo-setup-2" id="repo-setup-2" style="color: inherit; text-decoration: none;">
654+
<h3>Repo Setup</h3>
655+
</a>
656+
<p>The repo uses submodules. If you did not clone with <code> --recursive</code> then you need to call</p>
657+
<pre><code><span class="hl-3">git</span><span class="hl-1"> </span><span class="hl-3">submodule</span><span class="hl-1"> </span><span class="hl-3">update</span><span class="hl-1"> --</span><span class="hl-3">init</span>
658+
</code></pre>
659+
<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>
660+
<p>To develop and test:
661+
if you use <code>yarn</code> then run <code>yarn</code>
662+
if you use <code>pnpm</code> then run <code>pnpm i</code></p>
663+
<p><strong>Interactive Menu:</strong></p>
664+
<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>
665+
666+
<a href="#build-2" id="build-2" style="color: inherit; text-decoration: none;">
667+
<h3>Build</h3>
668+
</a>
669+
<pre><code class="language-bash"><span class="hl-1">npm run build.all</span>
670+
</code></pre>
671+
<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>
672+
673+
<a href="#demos-3" id="demos-3" style="color: inherit; text-decoration: none;">
674+
<h3>Demos</h3>
675+
</a>
676+
<pre><code class="language-bash"><span class="hl-1">npm run demo.[ng|react|svelte|vue].[ios|android]</span><br/><br/><span class="hl-1">npm run demo.svelte.ios </span><span class="hl-6"># Example</span>
677+
</code></pre>
678+
<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>
679+
Instead you work in <code>demo-snippets/[ng|react|svelte|vue]</code>
680+
You can start from the <code>install.ts</code> of each flavor to see how to register new demos </p>
681+
<p><a href="#contributing"></a></p>
682+
683+
<a href="#contributing-2" id="contributing-2" style="color: inherit; text-decoration: none;">
684+
<h2>Contributing</h2>
685+
</a>
686+
687+
<a href="#update-repo-2" id="update-repo-2" style="color: inherit; text-decoration: none;">
688+
<h3>Update repo</h3>
689+
</a>
690+
<p>You can update the repo files quite easily</p>
691+
<p>First update the submodules</p>
692+
<pre><code class="language-bash"><span class="hl-1">npm run update</span>
693+
</code></pre>
694+
<p>Then commit the changes
695+
Then update common files</p>
696+
<pre><code class="language-bash"><span class="hl-1">npm run sync</span>
697+
</code></pre>
698+
<p>Then you can run <code>yarn|pnpm</code>, commit changed files if any</p>
699+
700+
<a href="#update-readme-2" id="update-readme-2" style="color: inherit; text-decoration: none;">
701+
<h3>Update readme</h3>
702+
</a>
703+
<pre><code class="language-bash"><span class="hl-1">npm run readme</span>
704+
</code></pre>
705+
706+
<a href="#update-doc-2" id="update-doc-2" style="color: inherit; text-decoration: none;">
707+
<h3>Update doc</h3>
708+
</a>
709+
<pre><code class="language-bash"><span class="hl-1">npm run doc</span>
710+
</code></pre>
711+
712+
<a href="#publish-2" id="publish-2" style="color: inherit; text-decoration: none;">
713+
<h3>Publish</h3>
714+
</a>
715+
<p>The publishing is completely handled by <code>lerna</code> (you can add <code>-- --bump major</code> to force a major release)
716+
Simply run </p>
717+
<pre><code class="language-shell"><span class="hl-1">npm run publish</span>
718+
</code></pre>
719+
720+
<a href="#modifying-submodules-2" id="modifying-submodules-2" style="color: inherit; text-decoration: none;">
721+
<h3>modifying submodules</h3>
722+
</a>
723+
<p>The repo uses https:// for submodules which means you won&#39;t be able to push directly into the submodules.
724+
One easy solution is t modify <code>~/.gitconfig</code> and add</p>
725+
<pre><code><span class="hl-1">[</span><span class="hl-3">url</span><span class="hl-1"> </span><span class="hl-5">&quot;ssh://[email protected]/&quot;</span><span class="hl-1">]</span><br/><span class="hl-1"> </span><span class="hl-3">pushInsteadOf</span><span class="hl-1"> = </span><span class="hl-16">https</span><span class="hl-1">:</span><span class="hl-6">//github.com/</span>
726+
</code></pre>
727+
<p><a href="#questions"></a></p>
728+
729+
<a href="#questions-2" id="questions-2" style="color: inherit; text-decoration: none;">
730+
<h2>Questions</h2>
731+
</a>
732+
<p>If you have any questions/issues/comments please feel free to create an issue or start a conversation in the <a href="https://nativescript.org/discord">NativeScript Community Discord</a>.</p>
733+
</div></div>
646734
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
647735
<div class="tsd-navigation settings">
648736
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

0 commit comments

Comments
 (0)