Skip to content

Commit 2da360e

Browse files
committed
fix: Update package name references for Keep Awake plugin to @capgo/capacitor-keep-awake
1 parent b4f0fdc commit 2da360e

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

src/config/plugins.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ export const actions = [
814814
icon: RadioIcon,
815815
},
816816
{
817-
name: '@capgo/keep-awake',
817+
name: '@capgo/capacitor-keep-awake',
818818
author: 'github.com/Cap-go',
819819
description: 'Prevent device screen from dimming or sleeping for video players, navigation, and presentations',
820820
href: 'https://github.com/Cap-go/capacitor-keep-awake/',

src/content/docs/docs/plugins/keep-awake/getting-started.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { PackageManagers } from 'starlight-package-managers'
1111

1212
<Steps>
1313
1. **Install the package**
14-
<PackageManagers pkg="@capgo/keep-awake" pkgManagers={['npm', 'pnpm', 'yarn', 'bun']} />
14+
<PackageManagers pkg="@capgo/capacitor-keep-awake" pkgManagers={['npm', 'pnpm', 'yarn', 'bun']} />
1515

1616
2. **Sync with native projects**
1717
<PackageManagers type="exec" pkg="cap" args="sync" pkgManagers={['npm', 'pnpm', 'yarn', 'bun']} />
@@ -36,7 +36,7 @@ Works in modern browsers that support the Screen Wake Lock API. Call `isSupporte
3636
Import the plugin and use its methods to control screen wake lock:
3737

3838
```typescript
39-
import { KeepAwake } from '@capgo/keep-awake';
39+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
4040

4141
// Check if keep awake is supported
4242
const checkSupport = async () => {
@@ -111,7 +111,7 @@ const { version } = await KeepAwake.getPluginVersion();
111111
## Complete Example - Video Player
112112

113113
```typescript
114-
import { KeepAwake } from '@capgo/keep-awake';
114+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
115115

116116
export class VideoPlayerService {
117117
private isPlaying = false;
@@ -160,7 +160,7 @@ export class VideoPlayerService {
160160
## Complete Example - Navigation App
161161

162162
```typescript
163-
import { KeepAwake } from '@capgo/keep-awake';
163+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
164164
import { App } from '@capacitor/app';
165165

166166
export class NavigationService {
@@ -193,7 +193,7 @@ export class NavigationService {
193193
## Complete Example - Presentation Mode
194194

195195
```typescript
196-
import { KeepAwake } from '@capgo/keep-awake';
196+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
197197

198198
export class PresentationMode {
199199
private isPresenting = false;

src/content/docs/docs/plugins/keep-awake/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "@capgo/keep-awake"
2+
title: "@capgo/capacitor-keep-awake"
33
description: Prevent your device screen from dimming or sleeping with this simple Capacitor plugin.
44
tableOfContents: false
55
next: false

src/content/plugins-tutorials/en/capacitor-keep-awake.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
---
22
locale: en
33
---
4-
# Using @capgo/keep-awake Package
4+
# Using @capgo/capacitor-keep-awake Package
55

6-
The `@capgo/keep-awake` package allows you to prevent the device screen from dimming or sleeping. This is useful for video players, navigation apps, games, presentations, and any app that needs the screen to stay on. In this tutorial, we will guide you through the process of installing and using this package in your Capacitor app.
6+
The `@capgo/capacitor-keep-awake` package allows you to prevent the device screen from dimming or sleeping. This is useful for video players, navigation apps, games, presentations, and any app that needs the screen to stay on. In this tutorial, we will guide you through the process of installing and using this package in your Capacitor app.
77

88
## Installation
99

10-
To install the `@capgo/keep-awake` package, run the following command in your project's root directory:
10+
To install the `@capgo/capacitor-keep-awake` package, run the following command in your project's root directory:
1111

1212
```bash
13-
npm install @capgo/keep-awake
13+
npm install @capgo/capacitor-keep-awake
1414
npx cap sync
1515
```
1616

1717
## iOS Setup
1818

19-
The `@capgo/keep-awake` package works out of the box on iOS, so no additional setup is required.
19+
The `@capgo/capacitor-keep-awake` package works out of the box on iOS, so no additional setup is required.
2020

2121
## Android Setup
2222

23-
The `@capgo/keep-awake` package works out of the box on Android. No permissions are required.
23+
The `@capgo/capacitor-keep-awake` package works out of the box on Android. No permissions are required.
2424

2525
## Web Setup
2626

2727
On the web, the plugin uses the Screen Wake Lock API. Not all browsers support this API, so always check with `isSupported()` first.
2828

2929
## API
3030

31-
The `@capgo/keep-awake` package provides the following API methods:
31+
The `@capgo/capacitor-keep-awake` package provides the following API methods:
3232

3333
### keepAwake()
3434

3535
This method prevents the device from dimming the screen.
3636

3737
```typescript
38-
import { KeepAwake } from '@capgo/keep-awake';
38+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
3939

4040
async function enableKeepAwake() {
4141
await KeepAwake.keepAwake();
@@ -48,7 +48,7 @@ async function enableKeepAwake() {
4848
This method allows the device to dim the screen (disables keep awake).
4949

5050
```typescript
51-
import { KeepAwake } from '@capgo/keep-awake';
51+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
5252

5353
async function disableKeepAwake() {
5454
await KeepAwake.allowSleep();
@@ -61,7 +61,7 @@ async function disableKeepAwake() {
6161
This method checks if the keep awake feature is supported on the current platform.
6262

6363
```typescript
64-
import { KeepAwake } from '@capgo/keep-awake';
64+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
6565

6666
async function checkSupport() {
6767
const { isSupported } = await KeepAwake.isSupported();
@@ -74,7 +74,7 @@ async function checkSupport() {
7474
This method checks if the device is currently being kept awake.
7575

7676
```typescript
77-
import { KeepAwake } from '@capgo/keep-awake';
77+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
7878

7979
async function checkStatus() {
8080
const { isKeptAwake } = await KeepAwake.isKeptAwake();
@@ -87,7 +87,7 @@ async function checkStatus() {
8787
This method returns the native plugin version.
8888

8989
```typescript
90-
import { KeepAwake } from '@capgo/keep-awake';
90+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
9191

9292
async function getVersion() {
9393
const { version } = await KeepAwake.getPluginVersion();
@@ -100,7 +100,7 @@ async function getVersion() {
100100
Here's a complete example showing how to use keep awake with a video player:
101101

102102
```typescript
103-
import { KeepAwake } from '@capgo/keep-awake';
103+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
104104

105105
class VideoPlayerController {
106106
private isPlaying = false;
@@ -164,7 +164,7 @@ await player.cleanup();
164164
Here's an example of a presentation mode toggle button:
165165

166166
```typescript
167-
import { KeepAwake } from '@capgo/keep-awake';
167+
import { KeepAwake } from '@capgo/capacitor-keep-awake';
168168

169169
class PresentationMode {
170170
private enabled = false;
@@ -233,4 +233,4 @@ function updateUI(isEnabled: boolean) {
233233

234234
5. **Consider battery impact** - Keeping the screen on drains battery faster. Only use when necessary.
235235

236-
That's it! You have successfully learned how to use the `@capgo/keep-awake` package in your Capacitor app to prevent the screen from dimming.
236+
That's it! You have successfully learned how to use the `@capgo/capacitor-keep-awake` package in your Capacitor app to prevent the screen from dimming.

src/data/npm-downloads.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"@capgo/capacitor-compass": 375,
9292
"@capgo/capacitor-file": 311,
9393
"@capgo/capacitor-bluetooth-low-energy": 0,
94-
"@capgo/keep-awake": 0,
94+
"@capgo/capacitor-keep-awake": 0,
9595
"@capgo/capacitor-in-app-review": 0,
9696
"@capgo/capacitor-file-picker": 0
9797
}

0 commit comments

Comments
 (0)