Skip to content

Commit

Permalink
docs: conform to new plugins protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-lambert committed Aug 5, 2024
1 parent b171914 commit 0e76cfe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 73 deletions.
25 changes: 6 additions & 19 deletions website/docs/for-super-capacitor/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,10 @@ interface MicroappOptions {
modalStyle?: 'fullScreen' | 'pageSheet';
startDir?: string;
initialContext?: InitialContext;
plugins?: CapacitorPlugin[];
liveUpdateConfig?: LiveUpdateConfig;
}
```

### CapacitorPlugin

If you need to use any Capacitor plugins, the classpath of the Android plugins and the Objective-C class name will have to be provided to [`MicroappOptions`](#microappoptions) in the `plugins` property.

```typescript
interface CapacitorPlugin {
/** The classpath of the plugin to be used in Android. (e.g. com.capacitorjs.plugins.camera.CameraPlugin) */
androidClassPath: string;
/** The class name of the plugin to be used in iOS.
* This must be the name as it is exposed to the Objective-C runtime.
* For example, The CameraPlugin swift class is exposed to Objective-C as CAPCameraPlugin.
*/
iosClassName: string;
}
```

## Methods

- [`presentMicroapp(options: MicroappOptions)`](#presentmicroapp)
Expand All @@ -66,7 +49,7 @@ presentMicroapp({
});
```

> **_NOTE:_** A Typescript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports.
> **_NOTE:_** A TypeScript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports.
#### Parameters

Expand All @@ -88,4 +71,8 @@ import { dismissMicroapp } from '@ionic-enterprise/super-capacitor/microapp';
dismissMicroapp();
```

> **_NOTE:_** A Typescript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports.
> **_NOTE:_** A TypeScript module resolution Node16, NodeNext, or Bundler is required to recognize Super Capacitor's use of subpath exports.

## Plugins
A microapp can only use plugins installed in its superapp. All superapp plugins are automatically available to its microapps. If a microapp requires a plugin not used by its superapp, that plugin must still be installed in the superapp.

This file was deleted.

6 changes: 0 additions & 6 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,6 @@ module.exports = {
items: [
'for-super-capacitor/overview',
'for-super-capacitor/presentation-types',
{
type: 'category',
label: 'Tutorials',
collapsed: true,
items: ['for-super-capacitor/tutorials/nav-controller-example'],
},
],
},

Expand Down

0 comments on commit 0e76cfe

Please sign in to comment.