Skip to content

Commit

Permalink
Merge pull request #46 from wcho21/dev
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
wcho21 authored Dec 22, 2023
2 parents 2ed696e + b462ffe commit 96a5780
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 38 deletions.
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ Try _KAL_ at [KAL Playground][playground].



## πŸ—‘οΈ Installation

Load the interpreter script in HTML as follows:

```HTML
<script src="https://cdn.jsdelivr.net/gh/wcho21/kal@latest/dist/index.min.js"></script>
```

After that, you can execute _KAL_ code with `kal.execute(code-to-execute)` as follows:

```HTML
<script>
kal.execute("5+5"); // === 10
</script>
```



## πŸ—‘οΈ Examples

### Statements and expressions
Expand Down Expand Up @@ -91,9 +109,8 @@ _Boolean type_: `μ°Έ`, `거짓`
```


## πŸ—‘οΈ Manual building and installation

### How to build
## πŸ—‘οΈ Building

Note that building process is based on [Node.js][node].

Expand All @@ -103,21 +120,3 @@ The output will be in the directory `/bundle/index.js`.

[pnpm]: https://pnpm.io/
[node]: https://nodejs.org/



### How to use in browsers

Put the bundled file `index.js` (see above) in your directory, and load the file in HTML as following:

```HTML
<script src="/your-directory/index.js"></script>
```

After that, you can execute _KAL_ code with `kal.execute(code-to-execute)` as follows:

```HTML
<script>
kal.execute("5+5"); // === 10
</script>
```
38 changes: 20 additions & 18 deletions docs/README_KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ _KAL_ 을 [ν”Œλ ˆμ΄κ·ΈλΌμš΄λ“œ][playground]μ—μ„œ μ²΄ν—˜ν•΄λ³΄μ„Έμš”.



## λΈŒλΌμš°μ €μ—μ„œ μ‚¬μš©ν•˜κΈ°

λ‹€μŒκ³Ό 같이 인터프리터 슀크립트λ₯Ό HTML μƒμ—μ„œ λ‘œλ“œν•©λ‹ˆλ‹€.

```HTML
<script src="https://cdn.jsdelivr.net/gh/wcho21/kal@latest/dist/index.min.js"></script>
```

이후, _KAL_ μ½”λ“œλŠ” λ‹€μŒκ³Ό 같이 `kal.execute(code-to-execute)`둜 μ‹€ν–‰ν•©λ‹ˆλ‹€.

```HTML
<script>
kal.execute("5+5"); // === 10
</script>
```



## πŸ—‘οΈ μ˜ˆμ‹œ

### 문법듀
Expand Down Expand Up @@ -91,6 +109,7 @@ _λΆˆλ¦¬μ–Έ νƒ€μž…_: `μ°Έ`, `거짓`
```



## πŸ—‘οΈ λΉŒλ“œμ™€ μ„€μΉ˜

### λΉŒλ“œν•˜κΈ°
Expand All @@ -104,25 +123,8 @@ pnpm install && pnpm build && pnpm bundle`
```



κ²°κ³ΌλŠ” `/bundle/index.js` 디렉토리에 μœ„μΉ˜ν•©λ‹ˆλ‹€.

[pnpm]: https://pnpm.io/
[node]: https://nodejs.org/



### λΈŒλΌμš°μ €μ—μ„œ μ‚¬μš©ν•˜κΈ°

λΉŒλ“œν•œ 파일 `index.js`λ₯Ό μ›ν•˜λŠ” 디렉토리에 놓고, λ‹€μŒκ³Ό 같이 HTML μƒμ—μ„œ λ‘œλ“œν•©λ‹ˆλ‹€.

```HTML
<script src="/your-directory/index.js"></script>
```

이후, _KAL_ μ½”λ“œλŠ” λ‹€μŒκ³Ό 같이 `kal.execute(code-to-execute)`둜 μ‹€ν–‰ν•©λ‹ˆλ‹€.

```HTML
<script>
kal.execute("5+5"); // === 10
</script>
```

0 comments on commit 96a5780

Please sign in to comment.