forked from Project-DARC/DARC
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): improve the install step (Project-DARC#12)
- Loading branch information
Showing
6 changed files
with
5,566 additions
and
475 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,59 +2,53 @@ | |
sidebar_position: 1 | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
# Getting Started | ||
|
||
## What is darc.js? | ||
|
||
**darc.js** is a TypeScript/JavaScript library for interacting with the DARC virtual machine for node.js and the browser environment. | ||
**darc.js** is a TypeScript/JavaScript library for interacting with the DARC virtual machine for node.js and the browser | ||
environment. | ||
|
||
## Installation | ||
|
||
If you are using npm: | ||
|
||
```bash | ||
npm install darcjs | ||
``` | ||
|
||
If you are using yarn: | ||
You need to install **ethers.js** with version 5.7.2 or 5.x.x toghether with **darc.js**. | ||
|
||
```bash | ||
yarn add darcjs | ||
``` | ||
|
||
If you are using pnpm: | ||
<Tabs> | ||
<TabItem value="npm" label="NPM" default> | ||
|
||
```bash | ||
pnpm add darcjs | ||
```shell | ||
npm install darcjs [email protected] | ||
``` | ||
|
||
Also you need to install **ethers.js** with version 5.7.2 or 5.x.x: | ||
</TabItem> | ||
<TabItem value="yarn" label="YARN"> | ||
|
||
```bash | ||
npm install [email protected] | ||
```shell | ||
yarn add darcjs [email protected] | ||
``` | ||
|
||
or with yarn: | ||
</TabItem> | ||
<TabItem value="pnpm" label="PNPM"> | ||
|
||
```bash | ||
yarn add [email protected] | ||
```shell | ||
pnpm install darcjs [email protected] | ||
``` | ||
|
||
or with pnpm: | ||
|
||
```bash | ||
pnpm add [email protected] | ||
``` | ||
</TabItem> | ||
</Tabs> | ||
|
||
## Usage | ||
|
||
To use darc.js in your TypeScript project, import it as follows: | ||
To use darc.js supports ESM, import it as follows: | ||
|
||
```ts | ||
import { darcjs } from 'darcjs'; | ||
import {darcjs} from 'darcjs'; | ||
``` | ||
|
||
Or if you are using JavaScript: | ||
Or if you are using CommonJS: | ||
|
||
```js | ||
const darcjs = require('darcjs'); | ||
|
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
Oops, something went wrong.