Skip to content

Commit

Permalink
common-types: Added README and updated npm scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
CSantosM committed Jan 7, 2025
1 parent 6096b57 commit 5fda13e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
28 changes: 28 additions & 0 deletions common-types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Common-types

This library contains common types used by the OpenVidu Call application. It is a shared library that is used by both the frontend and backend of the application.

## Build

To build the library, run the following command:

```bash
npm install
npm run build
```

## Serve

For developing purposes, you can serve the library for actively watching changes. To do so, run the following command:

```bash
npm run serve
```

## Sync with OpenVidu Call

To apply changes from this library to the OpenVidu Call application, run the following command:

```bash
npm run sync-ce
```
1 change: 0 additions & 1 deletion common-types/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions common-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
"scripts": {
"build": "tsc",
"serve": "tsc -w",
"sync-ce": "PACKAGE=$(ls openvidu-call-common-types-*.tgz) && cp $PACKAGE ../frontend && cp $PACKAGE ../backend && npm install ../frontend/$PACKAGE --save-dev --prefix ../frontend && npm install ../backend/$PACKAGE --save-dev --prefix ../backend",
"sync-pro": "PACKAGE=$(ls openvidu-call-common-types-*.tgz) && cp $PACKAGE ../../openvidu-call-pro/frontend && cp $PACKAGE ../../openvidu-call-pro/backend && npm install ../../openvidu-call-pro/frontend/$PACKAGE --save-dev --prefix ../../openvidu-call-pro/frontend && npm install ../../openvidu-call-pro/backend/$PACKAGE --prefix ../../openvidu-call-pro/backend --save-dev",
"sync": "npm run build && npm pack && npm run sync-ce && npm run sync-pro"
"package": "npm run build && npm pack",
"sync-ce": "npm run package && PACKAGE=$(ls openvidu-call-common-types-*.tgz) && cp $PACKAGE ../frontend && cp $PACKAGE ../backend && npm install ../frontend/$PACKAGE --save-dev --prefix ../frontend && npm install ../backend/$PACKAGE --save-dev --prefix ../backend",
"sync-pro": "npm run package && PACKAGE=$(ls openvidu-call-common-types-*.tgz) && cp $PACKAGE ../../openvidu-call-pro/frontend && cp $PACKAGE ../../openvidu-call-pro/backend && npm install ../../openvidu-call-pro/frontend/$PACKAGE --save-dev --prefix ../../openvidu-call-pro/frontend && npm install ../../openvidu-call-pro/backend/$PACKAGE --prefix ../../openvidu-call-pro/backend --save-dev",
"sync": "npm run sync-ce && npm run sync-pro"
},
"devDependencies": {
"typescript": "^5.6.3"
Expand Down

0 comments on commit 5fda13e

Please sign in to comment.