fix: update package installation commands and import paths to use scoped package name
This commit is contained in:
10
README.md
10
README.md
@@ -15,11 +15,11 @@
|
||||
## 📦 Installation
|
||||
|
||||
```bash
|
||||
npm install typesrpc
|
||||
npm install @tonecn/typesrpc
|
||||
# or
|
||||
yarn add typesrpc
|
||||
yarn add @tonecn/typesrpc
|
||||
# or
|
||||
pnpm add typesrpc
|
||||
pnpm add @tonecn/typesrpc
|
||||
```
|
||||
|
||||
## 🚀 Quick Start
|
||||
@@ -71,7 +71,7 @@ const clientProvider = {
|
||||
### 2. Set Up Server & Client
|
||||
|
||||
```ts
|
||||
import { RPCHandler } from 'typesrpc';
|
||||
import { RPCHandler } from '@tonecn/typesrpc';
|
||||
|
||||
// Server
|
||||
const server = new RPCHandler();
|
||||
@@ -142,7 +142,7 @@ TypeSRPC supports pluggable transport layers. By default, it uses **Socket.IO**,
|
||||
|
||||
```ts
|
||||
// my-socket-impl/index.ts
|
||||
import { injectSocketClient, injectSocketServer } from 'typesrpc';
|
||||
import { injectSocketClient, injectSocketServer } from '@tonecn/typesrpc';
|
||||
import { MySocketClient } from './MySocketClient';
|
||||
import { MySocketServer } from './MySocketServer';
|
||||
|
||||
|
||||
10
README_zh.md
10
README_zh.md
@@ -15,11 +15,11 @@
|
||||
## 📦 安装
|
||||
|
||||
```bash
|
||||
npm install typesrpc
|
||||
npm install @tonecn/typesrpc
|
||||
# 或
|
||||
yarn add typesrpc
|
||||
yarn add @tonecn/typesrpc
|
||||
# 或
|
||||
pnpm add typesrpc
|
||||
pnpm add @tonecn/typesrpc
|
||||
```
|
||||
|
||||
## 🚀 快速开始
|
||||
@@ -71,7 +71,7 @@ const clientProvider = {
|
||||
### 2. 设置服务端与客户端
|
||||
|
||||
```ts
|
||||
import { RPCHandler } from 'typesrpc';
|
||||
import { RPCHandler } from '@tonecn/typesrpc';
|
||||
|
||||
// 服务端
|
||||
const server = new RPCHandler();
|
||||
@@ -142,7 +142,7 @@ TypeSRPC 支持可插拔的传输层。默认使用 **Socket.IO**,但你可以
|
||||
|
||||
```ts
|
||||
// my-socket-impl/index.ts
|
||||
import { injectSocketClient, injectSocketServer } from 'typesrpc';
|
||||
import { injectSocketClient, injectSocketServer } from '@tonecn/typesrpc';
|
||||
import { MySocketClient } from './MySocketClient';
|
||||
import { MySocketServer } from './MySocketServer';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user