Skip to content

Commit b710bf0

Browse files
authored
feat: capacitor page cleanup and plugin readme updates (#80)
1 parent 9245cc5 commit b710bf0

14 files changed

+197
-80
lines changed

.vitepress/config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ module.exports = {
9090
},
9191
{
9292
text: 'Capacitor',
93-
link: 'https://capacitor.nativescript.org',
93+
link: '/capacitor/index',
94+
activeMatch: '^/capacitor',
9495
},
9596
// {
9697
// text: 'Writing Guide',
@@ -274,6 +275,12 @@ function getPlugins() {
274275
readme: `${officialPlugins_baseUrl}/imagepicker/README.md`,
275276
repo: `${officialGithubUrl}/imagepicker`,
276277
},
278+
{
279+
name: 'Ionic Portals',
280+
link: '/plugins/ionic-portals',
281+
readme: `${officialPlugins_baseUrl}/ionic-portals/README.md`,
282+
repo: `${officialGithubUrl}/ionic-portals`,
283+
},
277284
{
278285
name: 'iOS Security',
279286
link: '/plugins/ios-security',
@@ -434,7 +441,7 @@ function getPlugins() {
434441
repo: `${firebaseGithubUrl}/firebase-in-app-messaging`,
435442
},
436443
{
437-
name: 'Insallations',
444+
name: 'Installations',
438445
link: '/plugins/firebase-installations',
439446
readme: `${firebasePlugins_baseUrl}/firebase-installations/README.md`,
440447
repo: `${firebaseGithubUrl}/firebase-installations`,

capacitor/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<svg width="126" height="24" viewBox="0 0 126 24" class="capacitor-logo sc-site-header" xmlns="http://www.w3.org/2000/svg"><path d="M30 11.8186C30 16.0223 33.0403 19.4133 37.4287 19.4133C41.8457 19.4133 44.0829 16.4147 44.4844 13.8083H41.0885C40.687 15.3777 39.2356 16.4707 37.4 16.4707C34.962 16.4707 33.2066 14.537 33.2066 11.8186C33.2066 9.07214 34.962 7.13842 37.4 7.13842C39.2356 7.13842 40.687 8.23139 41.0885 9.80078H44.4844C44.0829 7.19447 41.8457 4.1958 37.4287 4.1958C33.0403 4.1958 30 7.58682 30 11.8186Z" fill="black" class="sc-site-header"></path><path d="M57.1749 7.67557V19.127H54.2309V17.7297C53.4928 18.7757 52.1612 19.3924 50.5007 19.3924C47.0834 19.3924 45.0859 16.7227 45.0859 13.4052C45.0859 10.0798 47.0834 7.41797 50.5007 7.41797C52.1612 7.41797 53.4848 8.02684 54.2309 9.08065V7.68337H57.1749V7.67557ZM51.1745 10.1501C49.4017 10.1501 48.2786 11.5474 48.2786 13.4052C48.2786 15.263 49.4017 16.6603 51.1745 16.6603C52.9474 16.6603 54.0704 15.263 54.0704 13.4052C54.0784 11.5474 52.9554 10.1501 51.1745 10.1501Z" fill="black" class="sc-site-header"></path><path d="M61.7701 23H58.5774V7.68337H61.5214V9.08065C62.2594 8.03464 63.591 7.41797 65.2516 7.41797C68.6689 7.41797 70.6663 10.0876 70.6663 13.4052C70.6663 16.7305 68.6689 19.3924 65.2516 19.3924C63.591 19.3924 62.3798 18.6899 61.7701 17.9093V23ZM64.5777 16.6603C66.3506 16.6603 67.4736 15.263 67.4736 13.4052C67.4736 11.5474 66.3506 10.1501 64.5777 10.1501C62.8049 10.1501 61.6818 11.5474 61.6818 13.4052C61.6738 15.263 62.7969 16.6603 64.5777 16.6603Z" fill="black" class="sc-site-header"></path><path d="M83.5107 7.67557V19.127H80.5667V17.7297C79.8287 18.7757 78.4971 19.3924 76.8366 19.3924C73.4193 19.3924 71.4219 16.7227 71.4219 13.4052C71.4219 10.0798 73.4193 7.41797 76.8366 7.41797C78.4971 7.41797 79.8207 8.02684 80.5667 9.08065V7.68337H83.5107V7.67557ZM77.5104 10.1501C75.7376 10.1501 74.6146 11.5474 74.6146 13.4052C74.6146 15.263 75.7376 16.6603 77.5104 16.6603C79.2833 16.6603 80.4063 15.263 80.4063 13.4052C80.4143 11.5474 79.2913 10.1501 77.5104 10.1501Z" fill="black" class="sc-site-header"></path><path d="M90.3201 7.41797C93.978 7.41797 95.7107 9.93151 95.9353 11.8752H92.6544C92.4057 10.8916 91.4672 10.1735 90.296 10.1735C88.5874 10.1735 87.6007 11.4849 87.6007 13.4052C87.6007 15.3255 88.5874 16.6369 90.296 16.6369C91.4672 16.6369 92.4057 15.9187 92.6544 14.9352H95.9353C95.7107 16.8789 93.978 19.3924 90.3201 19.3924C86.9028 19.3924 84.416 16.8164 84.416 13.4052C84.416 9.99395 86.9028 7.41797 90.3201 7.41797Z" fill="black" class="sc-site-header"></path><path d="M96.1829 4.88125C96.1829 3.78841 96.9931 3 98.1161 3C99.2392 3 100.049 3.78841 100.049 4.88125C100.049 5.97409 99.2392 6.73908 98.1161 6.73908C96.9931 6.73908 96.1829 5.97409 96.1829 4.88125ZM96.5198 7.6758H99.7125V19.1272H96.5198V7.6758Z" fill="black" class="sc-site-header"></path><path d="M101.14 7.67635V4.83496H104.332V7.67635H106.787V10.2055H104.332V19.1356H101.14V10.1274" fill="black" class="sc-site-header"></path><path d="M106.256 13.4052C106.256 10.1501 108.663 7.41797 112.433 7.41797C116.203 7.41797 118.61 10.1501 118.61 13.4052C118.61 16.6603 116.203 19.3924 112.433 19.3924C108.663 19.3924 106.256 16.6603 106.256 13.4052ZM112.433 16.6603C114.118 16.6603 115.417 15.4582 115.417 13.4052C115.417 11.3522 114.118 10.1501 112.433 10.1501C110.748 10.1501 109.449 11.3522 109.449 13.4052C109.449 15.4582 110.748 16.6603 112.433 16.6603Z" fill="black" class="sc-site-header"></path><path d="M126 10.5015C126 10.5015 125.667 10.439 125.381 10.439C123.542 10.439 122.582 11.3367 122.582 13.4365V19.1427H119.426V7.67569H122.336V9.15883C122.756 8.47971 123.645 7.56641 125.619 7.56641C125.73 7.56641 126 7.58982 126 7.58982V10.5015Z" fill="black" class="sc-site-header"></path><path class="logo sc-site-header" d="M3.73712 5.07324L0.0291182 8.78592L5.74746 14.5214L0 20.2861L3.6964 24.0004L9.45544 18.2341L15.1833 23.9592L18.8913 20.2465L3.73712 5.07324Z" fill="#53B9FF"></path><path class="logo sc-site-header" d="M13.1735 14.5215L9.45557 18.2341L15.1834 23.9593L18.8914 20.2466L13.1735 14.5215Z" fill="#119EFF"></path><path class="logo sc-site-header" d="M13.1735 14.5215L9.45557 18.2341L10.8868 19.6574L13.1735 14.5215Z" fill="black" fill-opacity="0.2"></path><path class="logo sc-site-header" fill-rule="evenodd" clip-rule="evenodd" d="M18.2409 9.46736L24 3.70106L20.2904 0L14.533 5.75471L8.80468 0.0291556L5.09668 3.74184L20.2509 18.9151L23.9589 15.2024L18.2409 9.46736Z" fill="#53B9FF"></path><path class="logo sc-site-header" d="M10.815 9.46751L14.533 5.75485L8.80468 0.0292969L5.09668 3.74198L10.815 9.46751Z" fill="#119EFF"></path><path class="logo sc-site-header" d="M10.8149 9.46738L14.5329 5.75473L13.1013 4.33105L10.8149 9.46738Z" fill="black" fill-opacity="0.2"></path></svg>
22

3-
## NativeScript CLI
3+
## Capacitor for NativeScript
44

5-
1. Follow the NativeScript [Getting Started Guide](/environment-setup)
5+
If you'd like to use Capacitor within your NativeScript project:
66

7-
## Ionic CLI
7+
- [@nativescript/ionic-portals](https://github.com/NativeScript/plugins/tree/main/packages/ionic-portals#nativescriptionic-portals)
88

9-
1. Follow the Ionic [Getting Started Guide](https://ionicframework.com/getting-started)
9+
## NativeScript for Capacitor
1010

11-
2. Follow the Capacitor [Getting Started Guide](https://capacitorjs.com/docs/getting-started)
11+
If you'd like to use NativeScript within your Capacitor project:
1212

13-
3. `npm install @nativescript/capacitor`
13+
- [@nativescript/capacitor](https://capacitor.nativescript.org/)

plugins/animated-circle.md

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,26 @@ Creates an animated circle (animates the border of the circle) on iOS and Androi
1919
## Usage
2020

2121
```xml
22-
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
23-
xmlns:ui="@nativescript/animated-circle">
24-
<ui:AnimatedCircle
25-
backgroundColor="transparent"
26-
width="200"
27-
height="200"
28-
animated="true"
29-
animateFrom="0"
30-
rimColor="#FF5722"
31-
barColor="#3D8FF4"
32-
fillColor="#eee"
33-
clockwise="true"
34-
rimWidth="5"
35-
progress="80"
36-
text="bam"
37-
textSize="28"
38-
textColor="red" />
22+
<Page
23+
xmlns="http://schemas.nativescript.org/tns.xsd"
24+
xmlns:ui="@nativescript/animated-circle"
25+
>
26+
<ui:AnimatedCircle
27+
backgroundColor="transparent"
28+
width="200"
29+
height="200"
30+
animated="true"
31+
animateFrom="0"
32+
rimColor="#FF5722"
33+
barColor="#3D8FF4"
34+
fillColor="#eee"
35+
clockwise="true"
36+
rimWidth="5"
37+
progress="80"
38+
text="bam"
39+
textSize="28"
40+
textColor="red"
41+
/>
3942
</Page>
4043
```
4144

@@ -49,7 +52,20 @@ imports: [NativeScriptAnimatedCircleModule]
4952
```
5053

5154
```xml
52-
<AnimatedCircle backgroundColor="transparent" width="200" height="200" animated="true" animateFrom="0" rimColor="#fff000" barColor="#ff4081" rimWidth="25" progress="{{ circleProgress }}" text="" textSize="22" textColor="#336699"></AnimatedCircle>
55+
<AnimatedCircle
56+
backgroundColor="transparent"
57+
width="200"
58+
height="200"
59+
animated="true"
60+
animateFrom="0"
61+
rimColor="#fff000"
62+
barColor="#ff4081"
63+
rimWidth="25"
64+
progress="{{ circleProgress }}"
65+
text=""
66+
textSize="22"
67+
textColor="#336699"
68+
/>
5369
```
5470

5571
## API

plugins/apple-pay.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ Once that configuration is done for your Apple developer account, you will be ab
4141

4242
```xml
4343
<ios>
44-
<ApplePayBtn
45-
tap="onApplePayTap"
46-
buttonType="InStore"
47-
></ApplePayBtn>
44+
<ApplePayBtn tap="onApplePayTap" buttonType="InStore" />
4845
</ios>
4946
```
5047

plugins/apple-sign-in.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ Go to [the Apple developer](https://developer.apple.com/account/resources/identi
2020
Open your app's App_Resources/iOS folder and add the following (or append) to a file named app.entitlements.
2121

2222
```xml
23-
<?xml version="1.0" encoding="UTF-8"?>
24-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
23+
<?xml version="1.0" encoding="UTF-8" ?>
24+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
25+
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2526
<plist version="1.0">
26-
<dict>
27-
<key>com.apple.developer.applesignin</key>
28-
<array>
29-
<string>Default</string>
30-
</array>
31-
</dict>
27+
<dict>
28+
<key>com.apple.developer.applesignin</key>
29+
<array>
30+
<string>Default</string>
31+
</array>
32+
</dict>
3233
</plist>
3334
```
3435

plugins/auto-fit-text.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ This plugin is based on the Nativescript Label implementation but with changes t
2828
xmlns:AFT="@nativescript/auto-fit-text"
2929
>
3030
<StackLayout class="p-20">
31-
<AFT:AutoFitText
32-
text="Testinggggggggggggggggg"
33-
textWrap="false"
34-
></AFT:AutoFitText>
31+
<AFT:AutoFitText text="Testinggggggggggggggggg" textWrap="false" />
3532
</StackLayout>
3633
</Page>
3734
```
@@ -48,7 +45,12 @@ import { NativeScriptAutoFitTextModule } from '@nativescript/auto-fit-text/angul
4845
```
4946

5047
```xml
51-
<AutoFitText row="2" fontSize="48" text="Lorem Ipsum this line of text with fontSize ignored because the text is so long." textWrap="false"></AutoFitText>
48+
<AutoFitText
49+
row="2"
50+
fontSize="48"
51+
text="Lorem Ipsum this line of text with fontSize ignored because the text is so long."
52+
textWrap="false"
53+
/>
5254
```
5355

5456
## Credits

plugins/detox.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ You can use [NativeScript's `testID` property](https://blog.nativescript.org/nat
192192
Example:
193193

194194
```xml
195-
<Button text="Tap Me!" testID="testButton"></Button>
195+
<Button text="Tap Me!" testID="testButton" />
196196
```
197197

198198
```javascript
@@ -279,9 +279,9 @@ In order to use the `automationText` property in NativeScript it must be enabled
279279
Create a file called `ids.xml` in `App_Resources/Android/src/main/res/values/` and add the following:
280280
281281
```xml
282-
<?xml version="1.0" encoding="utf-8"?>
282+
<?xml version="1.0" encoding="utf-8" ?>
283283
<resources>
284-
<item type="id" name="nativescript_accessibility_id"/>
284+
<item type="id" name="nativescript_accessibility_id" />
285285
</resources>
286286
```
287287

plugins/fingerprint-auth.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ Then open `App_Resources/Android/app.gradle` and look for `minSdkVersion`.
2222
If that's set to a version less than 23, add this `overrideLibrary` line to `App_Resources/Android/src/main/AndroidManifest.xml`:
2323

2424
```xml
25-
<uses-sdk
26-
android:minSdkVersion="17"
27-
android:targetSdkVersion="__APILEVEL__"
28-
tools:overrideLibrary="com.jesusm.kfingerprintmanager"/>
25+
<uses-sdk
26+
android:minSdkVersion="17"
27+
android:targetSdkVersion="__APILEVEL__"
28+
tools:overrideLibrary="com.jesusm.kfingerprintmanager"
29+
/>
2930
```
3031

3132
## API

plugins/firebase-admob.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Through the use of NativeAdListener, you can listen for lifecycle events, such a
336336
<ui:NativeAdView height="400" loaded="{{nativeAdLoaded}}">
337337
<GridLayout height="300" width="300">
338338
<Label id="headLineView" />
339-
<ui:MediaView id="mediaView" height="100%"/>
339+
<ui:MediaView id="mediaView" height="100%" />
340340
<Label id="bodyView" />
341341
<Button id="callToActionView" />
342342
</GridLayout>

plugins/firebase-installations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: 'Insallations'
2+
title: 'Installations'
33
link: https://raw.githubusercontent.com/NativeScript/firebase/main/packages/firebase-installations/README.md
44
---
55

66
<div style="width: 100%; padding: 1.2em 0em">
77
<img alt="github logo" src="../assets/images/github/GitHub-Mark-32px.png" style="display: inline; margin: 1em 0.5em 1em 0em">
8-
<a href="https://github.com/NativeScript/firebase/tree/main/packages/firebase-installations" target="_blank" noopener>Insallations</a>
8+
<a href="https://github.com/NativeScript/firebase/tree/main/packages/firebase-installations" target="_blank" noopener>Installations</a>
99
</div>
1010

1111
# @nativescript/firebase-installations

0 commit comments

Comments
 (0)