Skip to content

Commit

Permalink
Merge pull request #4 from shigde/3-make-sdk-integrable
Browse files Browse the repository at this point in the history
3 make sdk integrable
  • Loading branch information
EnricoSchw authored Dec 21, 2023
2 parents 7361cdd + f9adf46 commit fd63f0d
Show file tree
Hide file tree
Showing 32 changed files with 2,612 additions and 1,277 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false

[*.json]
indent_size = 2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,6 @@ Thumbs.db
testem.log
/typings
deploy.sh
publish.sh


21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@

Shig Client-Server SDK for JavaScript

## Build
## Development
The Lobby web component is based on the `Shig/core` library. For development, please follow the instructions in the ``Shig/core`` [README](https://github.com/shigde/shig-js-sdk/tree/main/projects/core#readme).

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
## Download Lobby web component artifact
Please download the last tagged version

## Build Core lib

Run `npm run build:core` or run `ng build core` to build the core library. The build artifacts will be stored in the `dist/` directory.

## Build Lobby web component
## Build Lobby web component artifact

Run `npm run build:lobby` to build the lobby web component. The build `shig-lobby.js` artifacts will be stored in
the `dist/` directory.
the `dist/lobby` directory.

### Use web component
## Use web component

```html
<!DOCTYPE html>
Expand All @@ -33,10 +31,15 @@ the `dist/` directory.
// settings:
lobby.setAttribute('token', 'your-proxy-api-token');
lobby.setAttribute('api-prefix', '/your/proxy/api/prefix');
lobby.setAttribute('stream', '1234');
lobby.setAttribute('space', '[email protected]');
lobby.setAttribute('user', '[email protected]');
const wrapper = document.getElementById("wrapper");
wrapper.appendChild(lobby);
</script>
</body>
</html>
```

You can find the complete list of parameters here: [Parameter](https://github.com/shigde/shig-js-sdk/tree/main/projects/core#readme)
13 changes: 8 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"projectType": "library",
"root": "projects/core",
"sourceRoot": "projects/core/src",
"prefix": "lib",
"prefix": "shig",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
Expand Down Expand Up @@ -58,6 +58,9 @@
],
"tsConfig": "projects/lobby/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"allowedCommonJsDependencies": [
"sdp-transform"
],
"assets": [
"projects/lobby/src/favicon.ico",
"projects/lobby/src/assets"
Expand Down Expand Up @@ -92,10 +95,10 @@
"development": {
"buildOptimizer": false,
"optimization": false
// "vendorChunk": true,
// "extractLicenses": false,
// "sourceMap": true,
// "namedChunks": true
// "vendorChunk": true,
// "extractLicenses": false,
// "sourceMap": true,
// "namedChunks": true
}
},
"defaultConfiguration": "production"
Expand Down
2 changes: 1 addition & 1 deletion build-lobby.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const build = async () => {
];

await fs.ensureDir("dist/lobby");
await concat(files, "./dist/shig-lobby.js");
await concat(files, "./dist/lobby/shig-lobby.js");
console.log("Files concatenated successfully!!!");
};
build();
Loading

0 comments on commit fd63f0d

Please sign in to comment.