@xswitch/rtc

npm install --save @xswitch/rtc

Usage no npm install needed!

<script type="module">
  import xswitchRtc from 'https://cdn.skypack.dev/@xswitch/rtc';
</script>

README

XSwitch WebRTC 模块

模块使用

#npm
npm install --save @xswitch/rtc

#yarn
yarn add @xswitch/rtc

开发

初始化

 make 

推荐使用eslint + prettier 保持代码质量和风格的统一。
插件:

  • "esbenp.prettier-vscode",
  • "dbaeumer.vscode-eslint"

目录结构

  • src: 源码目录
  • @types: 类型文件目录
  • README: npm registry上显示的readme文件
  • README.md: 开发repo上显示的readme文件

更新typescript类型文件

  1. 更新javascript文件中js的jsdoc类型的注释
  2. 运行 make dts 生成TS类型文件

发布到NPM

  1. 登录 npm register
#检测 registery 
npm config get registry
>https://registry.npmjs.org/ #正确

#否则设置为npm registry  加 -g 为全局
npm config set -g registry https://registry.npmjs.org/

#登录账号
npm login
> username: xiaoyingtao
> password: xyt@npm@2021
> email: 3p@x-y-t.cn
  1. 发布
make publish