Skip to content

Commit

Permalink
docs: update for deno
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchen committed Sep 15, 2021
1 parent 37273aa commit 842bc9c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,10 @@ font_preview.draw2canvas(document.getElementById('mycanvas3').getContext('2d'))

})()
```

If you are using **Deno** instead of Node.js, you don't need to install the package with npm/yarn, and you should replace `const { $Font } = require('bdfparser'); const getline = require('readlineiter')` by:

```ts
import { $Font } from "https://raw.githubusercontent.com/tomchen/bdfparser-js/main/deno/mod.ts"
import readlineiter from 'https://raw.githubusercontent.com/tomchen/fetchline/main/packages/readlineiter-deno/mod.ts'
```
7 changes: 7 additions & 0 deletions deno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,10 @@ font_preview.draw2canvas(document.getElementById('mycanvas3').getContext('2d'))

})()
```

If you are using **Deno** instead of Node.js, you don't need to install the package with npm/yarn, and you should replace `const { $Font } = require('bdfparser'); const getline = require('readlineiter')` by:

```ts
import { $Font } from "https://raw.githubusercontent.com/tomchen/bdfparser-js/main/deno/mod.ts"
import readlineiter from 'https://raw.githubusercontent.com/tomchen/fetchline/main/packages/readlineiter-deno/mod.ts'
```

0 comments on commit 842bc9c

Please sign in to comment.