Skip to content

Commit 155597f

Browse files
committed
updated env-setup
1 parent 85cae4f commit 155597f

File tree

2 files changed

+39
-33
lines changed

2 files changed

+39
-33
lines changed

src/views/develop/guides/env-setup.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,37 @@ Install and configure the necessary tools for development
44

55
## Prerequisites
66

7-
For web app development, you can use Linux, macOS, or Windows. For native app development, you need to use Linux, macOS,
8-
or [WSL on Windows](https://learn.microsoft.com/en-us/windows/wsl/install).
7+
For web app development, you can use Linux, macOS, or Windows. For native app development, you need to use Linux or
8+
macOS.If you want to use Windows, you can use [Windows Subsystem for Linux (WSL)](https://aka.ms/wsl).
9+
10+
## Setup for Web App Development
11+
12+
Checkout [official manual on webOS TV Developer](https://webostv.developer.lge.com/develop/getting-started/developer-workflow).
13+
14+
## Setup for Native App Development
15+
16+
We provide [unofficial native SDK](https://github.com/webosbrew/native-toolchain/) for webOS TV.
17+
18+
Download the prebuilt SDK for your OS and CPU architecture. Extract the archive to your preferred location.
19+
20+
```bash Linux x86_64
21+
tar -zxf arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
22+
```
23+
24+
```bash Linux aarch64
25+
tar -jxf arm-webos-linux-gnueabi_sdk-buildroot_linux-aarch64.tar.bz2
26+
```
27+
28+
```bash macOS arm64
29+
tar -jxf arm-webos-linux-gnueabi_sdk-buildroot_darwin-arm64.tar.bz2
30+
```
31+
32+
```bash macOS x86_64
33+
tar -jxf arm-webos-linux-gnueabi_sdk-buildroot_darwin-x86_64.tar.bz2
34+
```
35+
36+
After extracting the SDK, run `relocate-sdk.sh` to update the SDK path.
37+
38+
```bash Linux & macOS & WSL
39+
/path/to/arm-webos-linux-gnueabi_sdk-buildroot/relocate-sdk.sh
40+
```

webpack/remark/tabbed-code-block.js

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,12 @@
11
import {visit} from "unist-util-visit";
22
import {toHtml} from "hast-util-to-html";
3-
import {kebabCase} from "lodash-es";
3+
import {kebabCase, repeat} from "lodash-es";
44
import {html} from "../htm-rehype.js";
55

66
/** @typedef {Code & {tab: string, tabId: string}} TabbedCode */
77

8-
9-
/**
10-
* @typedef {Function} Processor
11-
* @param {Root} tree
12-
* @param {import('vfile').VFile} [vfile]
13-
*/
14-
158
/** @returns {Processor} */
169
export default function tabbedCodeBlock() {
17-
18-
19-
/**
20-
* @param {Element} node
21-
* @return {[Element, Element] | null}
22-
*/
23-
function getTextAndPre(node) {
24-
if (node.tagName !== 'li' || !node.children) {
25-
return null;
26-
}
27-
let text = null;
28-
let pre = null;
29-
for (let child of node.children) {
30-
if (child.tagName === 'p') {
31-
text = child;
32-
} else if (child.tagName === 'pre') {
33-
pre = child;
34-
}
35-
}
36-
return text && pre && [text, pre];
37-
}
38-
3910
/** @param {Code|undefined} node */
4011
function isTabbedCodeBlock(node) {
4112
return node?.type === 'code' && node.meta;
@@ -58,7 +29,7 @@ export default function tabbedCodeBlock() {
5829
/** @type {Html} */
5930
const elem = {type: 'html'};
6031
/** @type {TabbedCode[]} */
61-
const tabs = parent.children.splice(firstTab, index - firstTab + 1, elem);
32+
const tabs = parent.children.slice(firstTab, index + 1);
6233
const prefix = `code-${tabs[0].position?.start?.offset}`;
6334
elem.value = toHtml(html`
6435
<div>
@@ -88,6 +59,9 @@ export default function tabbedCodeBlock() {
8859
</div>
8960
</div>`
9061
);
62+
63+
parent.children.fill({value: ''}, firstTab, index);
64+
parent.children[index] = elem;
9165
});
9266
};
9367
}

0 commit comments

Comments
 (0)