-
Notifications
You must be signed in to change notification settings - Fork 22
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
28 changed files
with
12,418 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ coverage | |
.nyc_output/ | ||
package-lock.json | ||
dist | ||
docs | ||
lib | ||
static | ||
lerna-debug.log | ||
|
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 |
---|---|---|
|
@@ -6,3 +6,4 @@ coverage | |
.nyc_output/ | ||
package-lock.json | ||
lerna-debug.log | ||
docs |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
v14 |
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
module.exports = { | ||
theme: "cosmos", | ||
title: "Vite.js", | ||
base: process.env.VUEPRESS_BASE || '/', | ||
|
||
locales: { | ||
"/": { | ||
lang: "en-US" | ||
}, | ||
}, | ||
|
||
themeConfig: { | ||
repo: "vitelabs/vite.js", | ||
docsRepo: "vitelabs/vite.js", | ||
docsDir: 'docs', | ||
editLinks: true, | ||
logo: { | ||
src: '/logo.svg', | ||
}, | ||
custom: true, | ||
algolia: { | ||
id: "BH4D9OD16A", | ||
key: "ac317234e6a42074175369b2f42e9754", | ||
index: "cosmos-sdk" | ||
}, | ||
topbar: { | ||
banner: false | ||
}, | ||
sidebar: { | ||
// Auto-sidebar, true by default | ||
auto: true, | ||
nav: [ | ||
{ | ||
title: "Resources", | ||
children: [ | ||
{ | ||
title: "vite.org", | ||
path: "https://vite.org" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
footer: { | ||
logo: "/logo.svg", | ||
textLink: { | ||
text: "vite.org", | ||
url: "https://vite.org" | ||
}, | ||
services: [ | ||
{ | ||
service: "twitter", | ||
url: "https://twitter.com/vitelabs" | ||
}, | ||
{ | ||
service: "medium", | ||
url: "https://medium.com/vitelabs" | ||
}, | ||
{ | ||
service: "telegram", | ||
url: "https://t.me/vite_ann" | ||
}, | ||
{ | ||
service: "discord", | ||
url: "https://discord.com/invite/CsVY76q" | ||
}, | ||
{ | ||
service: "github", | ||
url: "https://github.com/vitelabs" | ||
} | ||
], | ||
smallprint: | ||
`© ${new Date().getFullYear()} Vite Labs.`, | ||
} | ||
}, | ||
}; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
:root | ||
--color-link #006fe9 | ||
--color-primary #006fe9 |
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
sidebarDepth: 4 | ||
title: Start | ||
--- | ||
|
||
# Vite.js | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install @vite/vitejs --save | ||
npm install @vite/vitejs-ws --save | ||
``` | ||
|
||
Or | ||
|
||
```bash | ||
yarn add @vite/vitejs | ||
yarn add @vite/vitejs-ws | ||
``` | ||
|
||
## Module Import | ||
|
||
ES6: | ||
|
||
```javascript | ||
import { | ||
abi, error, keystore, utils, constant, | ||
accountBlock, ViteAPI, wallet | ||
} from '@vite/vitejs'; | ||
|
||
// must install http/ipc/ws packages separately if you need set up network connection | ||
import ws from '@vite/vitejs-ws'; | ||
import http from '@vite/vitejs-http'; | ||
import ipc from '@vite/vitejs-ipc'; | ||
``` | ||
|
||
Common: | ||
|
||
```javascript | ||
const { | ||
abi, error, keystore, utils, constant, | ||
accountBlock, ViteAPI, wallet | ||
} = require('@vite/vitejs'); | ||
|
||
// must install http/ipc/ws packages separately if you need set up network connection | ||
const { WS_RPC } = require('@vite/vitejs-ws'); | ||
const { HTTP_RPC } = require('@vite/vitejs-http'); | ||
const { IPC_RPC } = require('@vite/vitejs-ipc'); | ||
``` | ||
|
||
## Quick Start | ||
|
||
1. `npm install @vite/vitejs-ws` | ||
2. `npm install @vite/vitejs` | ||
3. Create file `test.js` | ||
```javascript | ||
const { WS_RPC } = require('@vite/vitejs-ws'); | ||
const { ViteAPI } = require('@vite/vitejs'); | ||
|
||
let WS_service = new WS_RPC("ws://example.com"); | ||
let provider = new ViteAPI(WS_service, () => { | ||
console.log("Connected"); | ||
}); | ||
|
||
provider.request('ledger_getSnapshotChainHeight').then((result) => { | ||
console.log(result); | ||
}).catch((err) => { | ||
console.warn(err); | ||
}); | ||
``` | ||
4. `node test.js` |
Oops, something went wrong.