chore: experimentally publish to jsr

This commit is contained in:
Zixuan Chen 2024-04-12 17:33:28 +08:00
parent 8752c229f9
commit df8bf029a6
No known key found for this signature in database
4 changed files with 22 additions and 0 deletions

3
loro-js/deno/.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"deno.enable": true
}

5
loro-js/deno/deno.json Normal file
View file

@ -0,0 +1,5 @@
{
"name": "@loro/loro",
"version": "0.1.0",
"exports": "./mod.ts"
}

1
loro-js/deno/mod.ts Normal file
View file

@ -0,0 +1 @@
export * from "npm:loro-crdt@0.14.2";

13
loro-js/deno/test.ts Normal file
View file

@ -0,0 +1,13 @@
import { Loro } from "./mod.ts";
import { expect } from 'npm:expect'
Deno.test("test", () => {
const doc = new Loro();
const text = doc.getText("text");
text.insert(0, "123")
expect(text.toString()).toEqual("123");
text.insert(0, "123")
expect(text.toString()).toEqual("123123");
const docB = Loro.fromSnapshot(doc.exportSnapshot());
expect(docB.getText('text').toString()).toEqual("123123");
})