Skip to content

Commit 7e63514

Browse files
committed
readme/doc
1 parent 385b95d commit 7e63514

File tree

3 files changed

+226
-2
lines changed

3 files changed

+226
-2
lines changed

README.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
* [Update readme ](#update-readme-)
6868
* [Update doc ](#update-doc-)
6969
* [Publish](#publish)
70+
* [modifying submodules](#modifying-submodules)
7071
* [Questions](#questions)
7172

7273

@@ -274,6 +275,7 @@ To start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`)
274275
```bash
275276
npm run build.all
276277
```
278+
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`
277279

278280
### Demos
279281

@@ -283,6 +285,10 @@ npm run demo.[ng|react|svelte|vue].[ios|android]
283285
npm run demo.svelte.ios # Example
284286
```
285287

288+
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]`
289+
Instead you work in `demo-snippets/[ng|react|svelte|vue]`
290+
You can start from the `install.ts` of each flavor to see how to register new demos
291+
286292

287293
[](#contributing)
288294

@@ -327,9 +333,115 @@ Simply run
327333
npm run publish
328334
```
329335

336+
### modifying submodules
337+
338+
The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
339+
One easy solution is t modify `~/.gitconfig` and add
340+
```
341+
[url "ssh://[email protected]/"]
342+
pushInsteadOf = https://github.com/
343+
```
344+
345+
346+
[](#questions)
347+
330348

331349
[](#questions)
332350

351+
## Questions
352+
353+
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
441+
```
442+
[url "ssh://[email protected]/"]
443+
pushInsteadOf = https://github.com/
444+
```
333445

334446
[](#questions)
335447

docs/assets/highlight.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
--dark-hl-7: #4EC9B0;
1818
--light-hl-8: #008000;
1919
--dark-hl-8: #6A9955;
20+
--light-hl-9: #000000;
21+
--dark-hl-9: #C8C8C8;
2022
--light-code-background: #FFFFFF;
2123
--dark-code-background: #1E1E1E;
2224
}
@@ -31,6 +33,7 @@
3133
--hl-6: var(--light-hl-6);
3234
--hl-7: var(--light-hl-7);
3335
--hl-8: var(--light-hl-8);
36+
--hl-9: var(--light-hl-9);
3437
--code-background: var(--light-code-background);
3538
} }
3639

@@ -44,6 +47,7 @@
4447
--hl-6: var(--dark-hl-6);
4548
--hl-7: var(--dark-hl-7);
4649
--hl-8: var(--dark-hl-8);
50+
--hl-9: var(--dark-hl-9);
4751
--code-background: var(--dark-code-background);
4852
} }
4953

@@ -57,6 +61,7 @@
5761
--hl-6: var(--light-hl-6);
5862
--hl-7: var(--light-hl-7);
5963
--hl-8: var(--light-hl-8);
64+
--hl-9: var(--light-hl-9);
6065
--code-background: var(--light-code-background);
6166
}
6267

@@ -70,6 +75,7 @@
7075
--hl-6: var(--dark-hl-6);
7176
--hl-7: var(--dark-hl-7);
7277
--hl-8: var(--dark-hl-8);
78+
--hl-9: var(--dark-hl-9);
7379
--code-background: var(--dark-code-background);
7480
}
7581

@@ -82,4 +88,5 @@
8288
.hl-6 { color: var(--hl-6); }
8389
.hl-7 { color: var(--hl-7); }
8490
.hl-8 { color: var(--hl-8); }
91+
.hl-9 { color: var(--hl-9); }
8592
pre, code { background: var(--code-background); }

docs/index.html

Lines changed: 107 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ <h2>Table of Contents</h2>
100100
<li><a href="#update-readme-">Update readme </a></li>
101101
<li><a href="#update-doc-">Update doc </a></li>
102102
<li><a href="#publish">Publish</a></li>
103+
<li><a href="#modifying-submodules">modifying submodules</a></li>
103104
</ul>
104105
</li>
105106
<li><a href="#questions">Questions</a></li>
@@ -177,6 +178,12 @@ <h3>Properties</h3>
177178
<td>Boolean setting if swipe gestures are enabled</td>
178179
</tr>
179180
<tr>
181+
<td>backdropTapGestureEnabled</td>
182+
<td><code>true</code></td>
183+
<td><code>boolean</code></td>
184+
<td>Allow tapping the backdrop to close the drawer</td>
185+
</tr>
186+
<tr>
180187
<td>backdropColor</td>
181188
<td><code>new Color(&#39;rgba(0, 0, 0, 0.7)&#39;)</code></td>
182189
<td><code>Color</code></td>
@@ -186,13 +193,13 @@ <h3>Properties</h3>
186193
<td>leftDrawerMode</td>
187194
<td><code>slide</code></td>
188195
<td><code>Mode (&#39;under&#39; or &#39;slide&#39;)</code></td>
189-
<td>The color of the backdrop behind the drawer</td>
196+
<td>The drawer&#39;s enter-animation behavior</td>
190197
</tr>
191198
<tr>
192199
<td>rightDrawerMode</td>
193200
<td><code>slide</code></td>
194201
<td><code>Mode (&#39;under&#39; or &#39;slide&#39;)</code></td>
195-
<td>The color of the backdrop behind the drawer</td>
202+
<td>The drawer&#39;s enter-animation behavior</td>
196203
</tr>
197204
<tr>
198205
<td>gestureMinDist</td>
@@ -428,12 +435,16 @@ <h3>Build</h3>
428435
</a>
429436
<pre><code class="language-bash"><span class="hl-1">npm run build.all</span>
430437
</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>
431439

432440
<a href="#demos" id="demos" style="color: inherit; text-decoration: none;">
433441
<h3>Demos</h3>
434442
</a>
435443
<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-8"># Example</span>
436444
</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>
437448
<p><a href="#contributing"></a></p>
438449
<p><a href="#contributing"></a></p>
439450

@@ -473,13 +484,107 @@ <h3>Publish</h3>
473484
Simply run </p>
474485
<pre><code class="language-shell"><span class="hl-1">npm run publish</span>
475486
</code></pre>
487+
488+
<a href="#modifying-submodules" id="modifying-submodules" style="color: inherit; text-decoration: none;">
489+
<h3>modifying submodules</h3>
490+
</a>
491+
<p>The repo uses https:// for submodules which means you won&#39;t be able to push directly into the submodules.
492+
One easy solution is t modify <code>~/.gitconfig</code> and add</p>
493+
<pre><code><span class="hl-1">[</span><span class="hl-2">url</span><span class="hl-1"> </span><span class="hl-3">&quot;ssh://[email protected]/&quot;</span><span class="hl-1">]</span><br/><span class="hl-1"> </span><span class="hl-2">pushInsteadOf</span><span class="hl-1"> = </span><span class="hl-9">https</span><span class="hl-1">:</span><span class="hl-8">//github.com/</span>
494+
</code></pre>
476495
<p><a href="#questions"></a></p>
477496
<p><a href="#questions"></a></p>
478497

479498
<a href="#questions" id="questions" style="color: inherit; text-decoration: none;">
480499
<h2>Questions</h2>
481500
</a>
482501
<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>
502+
<p><a href="#demos-and-development"></a></p>
503+
504+
<a href="#demos-and-development-1" id="demos-and-development-1" style="color: inherit; text-decoration: none;">
505+
<h2>Demos and Development</h2>
506+
</a>
507+
508+
<a href="#repo-setup-1" id="repo-setup-1" style="color: inherit; text-decoration: none;">
509+
<h3>Repo Setup</h3>
510+
</a>
511+
<p>The repo uses submodules. If you did not clone with <code> --recursive</code> then you need to call</p>
512+
<pre><code><span class="hl-2">git</span><span class="hl-1"> </span><span class="hl-2">submodule</span><span class="hl-1"> </span><span class="hl-2">update</span><span class="hl-1"> --</span><span class="hl-2">init</span>
513+
</code></pre>
514+
<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>
520+
521+
<a href="#build-1" id="build-1" style="color: inherit; text-decoration: none;">
522+
<h3>Build</h3>
523+
</a>
524+
<pre><code class="language-bash"><span class="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>
527+
528+
<a href="#demos-1" id="demos-1" style="color: inherit; text-decoration: none;">
529+
<h3>Demos</h3>
530+
</a>
531+
<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-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>
536+
<p><a href="#contributing"></a></p>
537+
538+
<a href="#contributing-1" id="contributing-1" style="color: inherit; text-decoration: none;">
539+
<h2>Contributing</h2>
540+
</a>
541+
542+
<a href="#update-repo-1" id="update-repo-1" style="color: inherit; text-decoration: none;">
543+
<h3>Update repo</h3>
544+
</a>
545+
<p>You can update the repo files quite easily</p>
546+
<p>First update the submodules</p>
547+
<pre><code class="language-bash"><span class="hl-1">npm run update</span>
548+
</code></pre>
549+
<p>Then commit the changes
550+
Then update common files</p>
551+
<pre><code class="language-bash"><span class="hl-1">npm run sync</span>
552+
</code></pre>
553+
<p>Then you can run <code>yarn|pnpm</code>, commit changed files if any</p>
554+
555+
<a href="#update-readme-1" id="update-readme-1" style="color: inherit; text-decoration: none;">
556+
<h3>Update readme</h3>
557+
</a>
558+
<pre><code class="language-bash"><span class="hl-1">npm run readme</span>
559+
</code></pre>
560+
561+
<a href="#update-doc-1" id="update-doc-1" style="color: inherit; text-decoration: none;">
562+
<h3>Update doc</h3>
563+
</a>
564+
<pre><code class="language-bash"><span class="hl-1">npm run doc</span>
565+
</code></pre>
566+
567+
<a href="#publish-1" id="publish-1" style="color: inherit; text-decoration: none;">
568+
<h3>Publish</h3>
569+
</a>
570+
<p>The publishing is completely handled by <code>lerna</code> (you can add <code>-- --bump major</code> to force a major release)
571+
Simply run </p>
572+
<pre><code class="language-shell"><span class="hl-1">npm run publish</span>
573+
</code></pre>
574+
575+
<a href="#modifying-submodules-1" id="modifying-submodules-1" style="color: inherit; text-decoration: none;">
576+
<h3>modifying submodules</h3>
577+
</a>
578+
<p>The repo uses https:// for submodules which means you won&#39;t be able to push directly into the submodules.
579+
One easy solution is t modify <code>~/.gitconfig</code> and add</p>
580+
<pre><code><span class="hl-1">[</span><span class="hl-2">url</span><span class="hl-1"> </span><span class="hl-3">&quot;ssh://[email protected]/&quot;</span><span class="hl-1">]</span><br/><span class="hl-1"> </span><span class="hl-2">pushInsteadOf</span><span class="hl-1"> = </span><span class="hl-9">https</span><span class="hl-1">:</span><span class="hl-8">//github.com/</span>
581+
</code></pre>
582+
<p><a href="#questions"></a></p>
583+
584+
<a href="#questions-1" id="questions-1" style="color: inherit; text-decoration: none;">
585+
<h2>Questions</h2>
586+
</a>
587+
<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>
483588
</div></div>
484589
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
485590
<div class="tsd-navigation settings">

0 commit comments

Comments
 (0)