kernelsu 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/index.js +8 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Library for KernelSU's module WebUI
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
yarn add kernelsu
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## API
|
|
10
|
+
|
|
11
|
+
### exec
|
|
12
|
+
|
|
13
|
+
Execute a command in the **root** shell.
|
|
14
|
+
|
|
15
|
+
options:
|
|
16
|
+
|
|
17
|
+
- `cwd` - Current working directory of the child process
|
|
18
|
+
- `env` - Environment key-value pairs
|
|
19
|
+
|
|
20
|
+
```javascript
|
|
21
|
+
import { exec } from 'kernelsu';
|
|
22
|
+
|
|
23
|
+
const { stdout, stderr } = await exec('ls -l', { cwd: '/tmp'});
|
|
24
|
+
console.log(stdout);
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### fullScreen
|
|
28
|
+
|
|
29
|
+
Request the WebView enter/exit full screen.
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
import { fullScreen } from 'kernelsu';
|
|
33
|
+
fullScreen(true);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### toast
|
|
37
|
+
|
|
38
|
+
Show a toast message.
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
import { toast } from 'kernelsu';
|
|
42
|
+
toast('Hello, world!');
|
|
43
|
+
```
|
package/index.js
CHANGED