# obv-bimserver-client

## 项目介绍

一个 obv 平台使用的轻量级的 bimserver client，能够在 dom 和 webworker 中被调用，达到
访问 auth， viewing 和 storage 等服务的目的。

## 软件架构

http 请求的库采用了 [axios](https://github.com/axios/axios)，该库能够在 dom 和 webworker
中运行，同时支持 promise 式调用。

测试框架采用的是 [jest](https://jestjs.io/)

实现的 `Client` 接口也是 Promise 风格。 

## 配置开发账号

将文件夹结构目录 `test/live/auth/`下的，`client-info.ts.template` 文件复制一份，并修改文件名为 `client-info.ts`，然后将文件中的`clientId`和`clientSecret`补充完整。

## 常用命令

1. `npm install`：安装依赖
2. `npm run test:watch`：运行测试，并在修改后自动运行，这个是开发常用命令 
3. `npm run test`： 运行全部的测试
4. `npm run build`： 编译并输出到 dist
5. `npm run dist`： 发布前的准备工作

## 注意事项

* 在测试目录中需要用到的一些敏感信息不能够上传到代码仓库中，需要通过使用 .template 文件
自行创建，并设置好敏感信息。
