mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 20:14:21 +01:00
Merge 'Fix Wasm packaging' from Pekka Enberg
The `wasm-pack` too has a known bug where it forgets to add snippets to `package.json`: https://github.com/rustwasm/wasm-pack/issues/1206 Let's fix that with some bash magic. Reviewed-by: Pere Diaz Bou <pere-altea@homail.com> Closes #381
This commit is contained in:
9
bindings/wasm/README.md
Normal file
9
bindings/wasm/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Limbo Wasm bindings
|
||||
|
||||
This source tree contains Limbo Wasm bindings.
|
||||
|
||||
## Building
|
||||
|
||||
```
|
||||
./scripts/build
|
||||
```
|
||||
@@ -2,4 +2,4 @@ import { Database } from 'limbo-wasm';
|
||||
|
||||
const db = new Database('hello.db');
|
||||
|
||||
db.exec("SELECT 'hello, world' AS message");
|
||||
console.log(db.exec("SELECT 'hello, world' AS message"));
|
||||
|
||||
20
bindings/wasm/package.json
Normal file
20
bindings/wasm/package.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "limbo-wasm",
|
||||
"collaborators": [
|
||||
"the Limbo authors"
|
||||
],
|
||||
"version": "0.0.4",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/penberg/limbo"
|
||||
},
|
||||
"files": [
|
||||
"snippets",
|
||||
"limbo_wasm_bg.wasm",
|
||||
"limbo_wasm.js",
|
||||
"limbo_wasm.d.ts"
|
||||
],
|
||||
"main": "limbo_wasm.js",
|
||||
"types": "limbo_wasm.d.ts"
|
||||
}
|
||||
4
bindings/wasm/scripts/build
Executable file
4
bindings/wasm/scripts/build
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
wasm-pack build --no-pack --target nodejs
|
||||
cp package.json pkg/package.json
|
||||
Reference in New Issue
Block a user