Skip to content

Commit

Permalink
chore: add deno import (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyg603 authored Mar 1, 2024
1 parent 49440d5 commit 4793b90
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## 👋 Introduction

BugSplat-js is a JavaScript error reporting system for web applications. Before continuing with the tutorial please make sure you have completed the following checklist:
BugSplat-js is a JavaScript error-reporting system for web applications. Before continuing with the tutorial, please make sure you have completed the following checklist:
* [Sign Up](https://app.bugsplat.com/v2/sign-up) as a new BugSplat user.
* [Log In](https://app.bugsplat.com/auth0/login) using your email address.

Expand All @@ -25,11 +25,12 @@ Install `bugsplat` via npm. This package currently requires Node.js 18 or later.
npm i bugsplat --save
```

If you need to use a version of Node.js that's older than 18, you can install [email protected].
If you need to use a version of Node.js older than 18, you can install [email protected].

## ⚙️ Configuration

Depending on your project's module system you can either `import` or `require` BugSplat:
Depending on your project's module system, you can either `import` or `require` BugSplat:

### ESM
```ts
import { BugSplat } from 'bugsplat';
Expand All @@ -40,6 +41,11 @@ import { BugSplat } from 'bugsplat';
const { BugSplat } = require('bugsplat');
```

### Deno
```ts
import { BugSplat } from 'https://esm.sh/[email protected]';
```

Create a new instance of the BugSplat class with the name of your BugSplat database, the name of your application and the version of your application:
```ts
const bugsplat = new BugSplat(database, application, version);
Expand Down

0 comments on commit 4793b90

Please sign in to comment.