Skip to content

Commit

Permalink
jsr support (part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
DjDeveloperr committed Mar 3, 2024
1 parent 06b500d commit 8f7bb34
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/[email protected].5/mod.ts)
[![Doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/[email protected].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)
Expand All @@ -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");
Expand Down Expand Up @@ -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 <file>
deno run --allow-ffi --allow-env --unstable-ffi <file>
# or just
deno run -A --unstable <file>
deno run -A --unstable-ffi <file>
```

## API
Expand Down
14 changes: 7 additions & 7 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 8f7bb34

Please sign in to comment.