From 8f7bb34328e01c2d4dbf15f0b3363733127d39b3 Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Sun, 3 Mar 2024 16:03:53 -0500 Subject: [PATCH] jsr support (part 2) --- README.md | 12 ++++++------ deno.json | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fe8e6e8..21ab240 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Skia Canvas [![Tags](https://img.shields.io/github/release/DjDeveloperr/skia_canvas)](https://github.com/DjDeveloperr/skia_canvas/releases) -[![Doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/skia_canvas@0.5.5/mod.ts) +[![Doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/skia_canvas@0.5.6/mod.ts) [![Checks](https://github.com/DjDeveloperr/skia_canvas/actions/workflows/ci.yml/badge.svg)](https://github.com/DjDeveloperr/skia_canvas/actions/workflows/ci.yml) [![License](https://img.shields.io/github/license/DjDeveloperr/skia_canvas)](https://github.com/DjDeveloperr/skia_canvas/blob/master/LICENSE) [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/DjDeveloperr) @@ -11,7 +11,7 @@ Fast HTML Canvas API implementation for Deno using Skia. ## Example ```ts -import { createCanvas } from "https://deno.land/x/skia_canvas@0.5.5/mod.ts"; +import { createCanvas } from "jsr:@gfx/canvas@0.5.6"; const canvas = createCanvas(300, 300); const ctx = canvas.getContext("2d"); @@ -39,13 +39,13 @@ canvas.save("image.png"); ## Usage Since this library depends on the unstable FFI API, you must pass `--allow-env`, -`--allow-ffi` and `--unstable` flags. Without it, the module will fail to find -and open native library. +`--allow-ffi` and `--unstable-ffi` flags. Without it, the module will fail to +find and open native library. ```sh -deno run --allow-ffi --allow-env --unstable +deno run --allow-ffi --allow-env --unstable-ffi # or just -deno run -A --unstable +deno run -A --unstable-ffi ``` ## API diff --git a/deno.json b/deno.json index 84ec4d0..c6a7873 100644 --- a/deno.json +++ b/deno.json @@ -6,14 +6,14 @@ "tasks": { "build": "cd native/build && CC=clang CXX=clang++ cmake .. && cmake --build . --config Release", "build-win": "rm -rf native/build && mkdir native/build && cd native/build && cmake .. -G \"Visual Studio 17 2022\" -T ClangCL && cmake --build . --config Release", - "test": "deno run -A --unstable ./test/test.ts", - "test-prebuilt": "deno run -A --unstable --import-map=./test/import_map.json ./test/test.ts", - "test-pdf": "deno run -A --unstable ./test/pdf.ts", - "test-svg": "deno run -A --unstable ./test/svg.ts", - "bench-deno": "deno bench -A --unstable bench/deno.js", + "test": "deno run -A --unstable-ffi ./test/test.ts", + "test-prebuilt": "deno run -A --unstable-ffi --import-map=./test/import_map.json ./test/test.ts", + "test-pdf": "deno run -A --unstable-ffi ./test/pdf.ts", + "test-svg": "deno run -A --unstable-ffi ./test/svg.ts", + "bench-deno": "deno bench -A --unstable-ffi bench/deno.js", "bench-node": "node bench/node.mjs", - "bench": "deno run -A --unstable bench/main.js", - "build-skia": "deno run -A --unstable scripts/build_skia.ts" + "bench": "deno run -A --unstable-ffi bench/main.js", + "build-skia": "deno run -A --unstable-ffi scripts/build_skia.ts" }, "fmt": {