-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
111 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,28 +20,28 @@ import TabItem from "@components/Tabs/TabItem.astro"; | |
<TabItem value="npm" label="npm" default> | ||
|
||
```bash | ||
npm install --save surrealdb.js | ||
npm install --save surrealdb | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="yarn" label="yarn"> | ||
|
||
```bash | ||
yarn add surrealdb.js | ||
yarn add surrealdb | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="pnpm" label="pnpm"> | ||
|
||
```bash | ||
pnpm install surrealdb.js | ||
pnpm install surrealdb | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="bun" label="bun"> | ||
|
||
```bash | ||
bun install surrealdb.js | ||
bun install surrealdb | ||
``` | ||
|
||
</TabItem> | ||
|
@@ -57,11 +57,11 @@ After installing, you can then import the SDK into your project. Depending on yo | |
> It is recommended to import this in a utility file or a file that is shared across your application. | ||
```bash title="CommonJS" | ||
const { Surreal } = require('surrealdb.js'); | ||
const { Surreal } = require('surrealdb'); | ||
``` | ||
```bash title="ES6" | ||
import { Surreal } from 'surrealdb.js'; | ||
import { Surreal } from 'surrealdb'; | ||
``` | ||
In a deno runtime, you can import the SDK using the following syntax: | ||
|
@@ -77,9 +77,9 @@ import Surreal from "https://deno.land/x/[email protected]/mod.ts"; | |
Importing via a CDN is also supported: | ||
```bash title="CDN" | ||
import Surreal from "https://unpkg.com/surrealdb.js"; | ||
import Surreal from "https://unpkg.com/surrealdb"; | ||
// or | ||
import Surreal from "https://cdn.jsdelivr.net/npm/surrealdb.js"; | ||
import Surreal from "https://cdn.jsdelivr.net/npm/surrealdb"; | ||
``` | ||
### Initialize the SDK | ||
|