From 5d8c32e8e8523922278016c91d40d6a8b78b486e Mon Sep 17 00:00:00 2001 From: tone <3341154833@qq.com> Date: Wed, 15 Oct 2025 12:53:55 +0800 Subject: [PATCH] fix: update package installation commands and import paths to use scoped package name --- README.md | 10 +++++----- README_zh.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index df2e19e..c068390 100644 --- a/README.md +++ b/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'; diff --git a/README_zh.md b/README_zh.md index 8e0d2aa..b445ffc 100644 --- a/README_zh.md +++ b/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';