Skip to content

Commit 79465f8

Browse files
committed
chore: docs for 1.0.0-alpha10
- docs: add sqlite js docs - docs: add invocation samples to each lang page - chore: version bump to `1.0.0-alpha10`
1 parent 655856e commit 79465f8

File tree

9 files changed

+51
-3
lines changed

9 files changed

+51
-3
lines changed

.github/workflows/build-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
ALGOLIA_APP_NAME: 'GPZ3MWT2LQ'
1717
ALGOLIA_INDEX_NAME: 'dev_elide_docs'
1818
CONFIG_JSON_PRODUCT: 'E'
19-
CONFIG_JSON_VERSION: '1.0.0-alpha9'
19+
CONFIG_JSON_VERSION: '1.0.0-alpha10'
2020

2121
jobs:
2222
build:

Writerside/e.tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
<toc-element toc-title="Web Crypto API" />
6868
<toc-element toc-title="Web Streams API" />
6969
</toc-element>
70+
<toc-element topic="javascript-sqlite.md"/>
7071
</toc-element>
7172
<toc-element topic="Python.md"/>
7273
<toc-element topic="Ruby.md"/>
@@ -108,6 +109,7 @@
108109
</toc-element>
109110
</toc-element>
110111
<toc-element toc-title="Release Notes">
112+
<toc-element toc-title="1.0.0-alpha10" href="https://github.com/elide-dev/elide/releases/tag/1.0.0-alpha10" />
111113
<toc-element toc-title="1.0.0-alpha9" href="https://github.com/elide-dev/elide/releases/tag/1.0.0-alpha9" />
112114
<toc-element toc-title="1.0.0-alpha8" href="https://github.com/elide-dev/elide/releases/tag/1.0.0-alpha8" />
113115
<toc-element toc-title="1.0.0-alpha7" href="https://github.com/elide-dev/elide/releases/tag/1.0.0-alpha7" />

Writerside/topics/JavaScript.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
%product% can execute JavaScript, just like Node.js, Deno, or Bun. Similar to other popular JavaScript runtimes,
44
%product% strives for Node API compatibility.
55

6+
```Console
7+
elide run --javascript ...
8+
```
69
```Javascript
710
export default function hello() {
811
console.log("Elide can run JavaScript!")

Writerside/topics/Python.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
%product% can run Python applications under the Python 3 language standard; %product% behaves nearly identically to
44
CPython.
55

6+
```Console
7+
elide run --python ...
8+
```
69
```Python
710
def hello():
811
print("Elide can run Python!")

Writerside/topics/Ruby.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
%product% can execute your Ruby applications, while integrating with other languages like JavaScript and Python.
44

5+
```Console
6+
elide run --ruby ...
7+
```
58
```Ruby
69
def hello
710
puts "Elide can run Ruby!"

Writerside/topics/TypeScript.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
%product% can run TypeScript using the built-in [JavaScript engine](JavaScript.md).
44

5+
```Console
6+
elide run --typescript ...
7+
```
58
```Typescript
69
export function hello(name: string): void {
710
console.log(`Hello from TypeScript, ${name}!`)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
switcher-label: Imports
3+
---
4+
5+
# SQLite in JavaScript
6+
7+
<tldr>
8+
<p>Module: <code>elide:sqlite</code></p>
9+
<p>Support: <img style="inline" src="https://img.shields.io/badge/-beta-purple" /></p>
10+
<p>Docs: <a href="https://bun.sh/docs/api/sqlite">Bun SQLite Docs</a></p>
11+
</tldr>
12+
13+
Elide embeds native support for [SQLite3](https://sqlite.org), with bindings into JavaScript. The API provided is
14+
identical to [Bun's SQLite bindings](https://bun.sh/docs/api/sqlite).
15+
16+
<code-block lang="javascript" switcher-key="ESM">import { Database } from "elide:sqlite"</code-block>
17+
<code-block lang="javascript" switcher-key="CJS">const { Database } = require("elide:sqlite")</code-block>
18+
19+
```Javascript
20+
import { Database } from "elide:sqlite"
21+
const db = new Database()
22+
db.exec("CREATE TABLE test (id INTEGER PRIMARY KEY, name TEXT);")
23+
db.exec("INSERT INTO test (name) VALUES ('foo');")
24+
db.query("SELECT * FROM test;").get()["name"]
25+
// 'foo'
26+
```
27+
28+
> Bindings are on the way for Python and Ruby.
29+
> {style="note"}
30+
31+
## `sqlite` | Classes
32+
33+
[`Database`](https://bun.sh/docs/api/sqlite#database)
34+
: 🟢 Supported.

Writerside/v.list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd">
33
<vars>
44
<var name="product" value="Elide"/>
5-
<var name="version" value="1.0.0-alpha9"/>
5+
<var name="version" value="1.0.0-alpha10"/>
66
<var name="elideDocsSite" value="https://docs.elide.dev"/>
77
<var name="elideSite" value="https://elide.dev"/>
88
<var name="elideGitHubOrg" value="https://github.com/elide-dev"/>

Writerside/writerside.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
<images dir="images" web-path="docs"/>
88
<categories src="c.list"/>
99
<vars src="v.list"/>
10-
<instance src="e.tree" version="1.0.0-alpha9" web-path="E" />
10+
<instance src="e.tree" version="1.0.0-alpha10" web-path="E" />
1111
</ihp>

0 commit comments

Comments
 (0)