Skip to content

Commit 528bdf6

Browse files
committed
chore: readme
1 parent 56f43c8 commit 528bdf6

File tree

4 files changed

+242
-15
lines changed

4 files changed

+242
-15
lines changed

README.md

Lines changed: 125 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ export function openBottomSheet(args) {
926926

927927
##
928928

929-
### NativeScript + Vue
929+
### NativeScript + Vue 2
930930
```typescript
931931
import Vue from 'nativescript-vue';
932932
import BottomSheetPlugin from '@nativescript-community/ui-material-bottomsheet/vue';
@@ -945,6 +945,32 @@ const options: VueBottomSheetOptions = {
945945
this.$showBottomSheet(MyComponent, options)
946946
```
947947

948+
### NativeScript + Vue 3
949+
```typescript
950+
import { createApp } from 'nativescript-vue';
951+
import { BottomSheetPlugin } from '@nativescript-community/ui-material-bottomsheet/vue3';
952+
import { install } from "@nativescript-community/ui-material-bottomsheet";
953+
install();
954+
955+
const app = createApp(...);
956+
app.use(BottomSheetPlugin);
957+
```
958+
Then you can show a Vue component:
959+
```typescript
960+
import { useBottomSheet } from "@nativescript-community/ui-material-bottomsheet/vue3";
961+
import MyComponent from 'MyComponent.vue';
962+
963+
964+
const options: VueBottomSheetOptions = {
965+
...
966+
};
967+
968+
const { showBottomSheet, closeBottomSheet } = useBottomSheet()
969+
970+
showBottomSheet(MyComponent, options);
971+
closeBottomSheet();
972+
```
973+
948974
##
949975

950976
### NativeScript + Angular
@@ -2811,4 +2837,101 @@ An attribute to set the helper text of the textview.
28112837

28122838
A boolean attribute to set the floating state of the textview.
28132839

2814-
</details>
2840+
</details>
2841+
2842+
[](#demos-and-development)
2843+
2844+
## Demos and Development
2845+
2846+
2847+
### Repo Setup
2848+
2849+
The repo uses submodules. If you did not clone with ` --recursive` then you need to call
2850+
```
2851+
git submodule update --init
2852+
```
2853+
2854+
The package manager used to install and link dependencies must be `pnpm` or `yarn`. `npm` wont work.
2855+
2856+
To develop and test:
2857+
if you use `yarn` then run `yarn`
2858+
if you use `pnpm` then run `pnpm i`
2859+
2860+
**Interactive Menu:**
2861+
2862+
To start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`). This will list all of the commonly used scripts.
2863+
2864+
### Build
2865+
2866+
```bash
2867+
npm run build.all
2868+
```
2869+
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`
2870+
2871+
### Demos
2872+
2873+
```bash
2874+
npm run demo.[ng|react|svelte|vue].[ios|android]
2875+
2876+
npm run demo.svelte.ios # Example
2877+
```
2878+
2879+
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]`
2880+
Instead you work in `demo-snippets/[ng|react|svelte|vue]`
2881+
You can start from the `install.ts` of each flavor to see how to register new demos
2882+
2883+
2884+
[](#contributing)
2885+
2886+
## Contributing
2887+
2888+
### Update repo
2889+
2890+
You can update the repo files quite easily
2891+
2892+
First update the submodules
2893+
2894+
```bash
2895+
npm run update
2896+
```
2897+
2898+
Then commit the changes
2899+
Then update common files
2900+
2901+
```bash
2902+
npm run sync
2903+
```
2904+
Then you can run `yarn|pnpm`, commit changed files if any
2905+
2906+
### Update readme
2907+
```bash
2908+
npm run readme
2909+
```
2910+
2911+
### Update doc
2912+
```bash
2913+
npm run doc
2914+
```
2915+
2916+
### Publish
2917+
2918+
The publishing is completely handled by `lerna` (you can add `-- --bump major` to force a major release)
2919+
Simply run
2920+
```shell
2921+
npm run publish
2922+
```
2923+
2924+
### modifying submodules
2925+
2926+
The repo uses https:// for submodules which means you won't be able to push directly into the submodules.
2927+
One easy solution is t modify `~/.gitconfig` and add
2928+
```
2929+
[url "ssh://[email protected]/"]
2930+
pushInsteadOf = https://github.com/
2931+
```
2932+
2933+
[](#questions)
2934+
2935+
## Questions
2936+
2937+
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/assets/highlight.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
--dark-hl-16: #4EC9B0;
3636
--light-hl-17: #000000FF;
3737
--dark-hl-17: #D4D4D4;
38+
--light-hl-18: #000000;
39+
--dark-hl-18: #C8C8C8;
3840
--light-code-background: #FFFFFF;
3941
--dark-code-background: #1E1E1E;
4042
}
@@ -58,6 +60,7 @@
5860
--hl-15: var(--light-hl-15);
5961
--hl-16: var(--light-hl-16);
6062
--hl-17: var(--light-hl-17);
63+
--hl-18: var(--light-hl-18);
6164
--code-background: var(--light-code-background);
6265
} }
6366

@@ -80,6 +83,7 @@
8083
--hl-15: var(--dark-hl-15);
8184
--hl-16: var(--dark-hl-16);
8285
--hl-17: var(--dark-hl-17);
86+
--hl-18: var(--dark-hl-18);
8387
--code-background: var(--dark-code-background);
8488
} }
8589

@@ -102,6 +106,7 @@
102106
--hl-15: var(--light-hl-15);
103107
--hl-16: var(--light-hl-16);
104108
--hl-17: var(--light-hl-17);
109+
--hl-18: var(--light-hl-18);
105110
--code-background: var(--light-code-background);
106111
}
107112

@@ -124,6 +129,7 @@
124129
--hl-15: var(--dark-hl-15);
125130
--hl-16: var(--dark-hl-16);
126131
--hl-17: var(--dark-hl-17);
132+
--hl-18: var(--dark-hl-18);
127133
--code-background: var(--dark-code-background);
128134
}
129135

@@ -145,4 +151,5 @@
145151
.hl-15 { color: var(--hl-15); }
146152
.hl-16 { color: var(--hl-16); }
147153
.hl-17 { color: var(--hl-17); }
154+
.hl-18 { color: var(--hl-18); }
148155
pre, code { background: var(--code-background); }

docs/assets/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)