openvidu-components: Moved docs config files under library directory

pull/715/head
csantosm 2022-04-08 13:52:12 +02:00
parent 71d94db06e
commit b2d5a6e3b6
20 changed files with 78 additions and 79 deletions

View File

@ -1,12 +1,43 @@
# Openvidu Angular # Openvidu Angular TestAPP
The easier way to build powerful OpenVidu videoconference frontend applications.
How to install: ## Architechture
``` ```
npm install openvidu-angular openvidu-components-angular
└─── src (openvidu-components-testapp)
└───projects
└─── openvidu-angular
```
## How to develop with ease:
Run `ng serve` for a dev server.
Run, in a new terminal, `npm run lib:serve` for serving the openvidu-angular library with live reload for listening changes
## Code scaffolding
For generate new components in openvidu-angular:
```bash
ng g component components/component-name --project=openvidu-angular
``` ```
## Build library
```bash
npm run lib:build
```
## Publishing
After the library is built, tun the following command:
```bash
cd dist/ && npm publish
```

View File

@ -8,13 +8,13 @@
"build": "ng build openvidu-components-testapp --configuration production", "build": "ng build openvidu-components-testapp --configuration production",
"lib:serve": "ng build openvidu-angular --watch", "lib:serve": "ng build openvidu-angular --watch",
"lib:build": "ng build openvidu-angular --configuration production && cd ./dist/openvidu-angular && npm pack", "lib:build": "ng build openvidu-angular --configuration production && cd ./dist/openvidu-angular && npm pack",
"lib:copy": "cp dist/openvidu-angular/openvidu-angular-*.tgz ../openvidu-tutorials/openvidu-angular-components", "lib:copy": "cp dist/openvidu-angular/openvidu-angular-*.tgz ../../openvidu-tutorials/openvidu-call/openvidu-call-front",
"lib:test": "ng test openvidu-angular --no-watch --code-coverage", "lib:test": "ng test openvidu-angular --no-watch --code-coverage",
"lib:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/angular.test.js", "lib:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/angular.test.js",
"lib:e2e-ci": "cross-env LAUNCH_MODE=CI npm run lib:e2e", "lib:e2e-ci": "cross-env LAUNCH_MODE=CI npm run lib:e2e",
"lib:doc-build": "npx compodoc -p src/doc/tsconfig.doc.json -c src/doc/.compodocrc.json", "doc:build": "cd projects/openvidu-angular && npx compodoc -p ./doc/tsconfig.doc.json -c ./doc/.compodocrc.json",
"lib:clean-copy": "rm -rf ../../openvidu.io-docs/docs/api/openvidu-angular && cp -r ./docs/openvidu-angular/ ../../openvidu.io-docs/docs/api/openvidu-angular", "doc:clean-copy": "rm -rf ../../openvidu.io-docs/docs/api/openvidu-angular && cp -r ./docs/openvidu-angular/ ../../openvidu.io-docs/docs/api/openvidu-angular",
"lib:doc-serve": "npx compodoc -p src/doc/tsconfig.doc.json --watch --serve -c src/doc/.compodocrc.json", "doc:serve": "cd projects/openvidu-angular && npx compodoc -p ./doc/tsconfig.doc.json --watch --serve -c ./doc/.compodocrc.json",
"webcomponent:build": "./node_modules/@angular/cli/bin/ng.js build openvidu-webcomponent --configuration production && node ./openvidu-webcomponent-build.js", "webcomponent:build": "./node_modules/@angular/cli/bin/ng.js build openvidu-webcomponent --configuration production && node ./openvidu-webcomponent-build.js",
"webcomponent:serve-testapp": "npx http-server ./e2e/webcomponent-app/", "webcomponent:serve-testapp": "npx http-server ./e2e/webcomponent-app/",
"webcomponent:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent.test.js", "webcomponent:e2e": "tsc --project ./e2e && npx mocha --recursive --timeout 30000 ./e2e/dist/webcomponent.test.js",

View File

@ -1,63 +1,28 @@
# openvidu-angular # openvidu-angular
openvidu-angular is a library generated with the aim of facilitate the customization of videconference app provides by OpenVidu, providing powerful ready-to-use components. The easier way to build powerful OpenVidu videoconference frontend applications.
This library is an Angular library based on Angular projections ## How to install
## Code scaffolding
## Architechture
``` ```
openvidu-components-angular npm install openvidu-angular@latest
└─── src (openvidu-components-testapp)
└───projects
└─── openvidu-angular
``` ```
## Development server ## Ho to use it
Run `ng serve` for a dev server. In your `app.module.ts`:
Run, in a new terminal, `npm run lib:serve` for serving the openvidu-angular library with live reload
## Code scaffolding
For generate new components in openvidu-angular:
```bash
ng g component components/component-name --project=openvidu-angular
```
## Build
```bash
npm run lib:build
```
## Publishing
After the library is built, tun the following command:
```bash
cd dist/ && npm publish
```
## How to use in an Angular project
Importing library module in yout `app.module.ts`
```typescript ```typescript
import { OpenViduAngularConfig, OpenViduAngularModule } from 'openvidu-angular';
const config: OpenViduAngularConfig = {
production: environment.production
};
@NgModule({ @NgModule({
imports: [ imports: [
BrowserModule, ...
OpenviduAngularModule.forRoot({ OpenViduAngularModule.forRoot(config)
environment: environment ]
}), })
...
]})
``` ```

View File

@ -1,6 +1,6 @@
{ {
"name": "OpenVidu Angular Documentation", "name": "OpenVidu Angular Documentation",
"output": "docs/openvidu-angular", "output": "../../docs/openvidu-angular",
"hideGenerator": true, "hideGenerator": true,
"disableLifeCycleHooks": true, "disableLifeCycleHooks": true,
"disableProtected": true, "disableProtected": true,
@ -14,7 +14,8 @@
"disableStyleTab": true, "disableStyleTab": true,
"disableDependencies": true, "disableDependencies": true,
"theme": "gitbook", "theme": "gitbook",
"customFavicon": "src/favicon.ico", "customFavicon": "doc/favicon.ico",
"extTheme": "src/doc/", "extTheme": "doc/",
"assetsFolder": "src/doc/assets" "assetsFolder": "doc/assets"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,16 @@
{
"include": [
"../src/lib/components/**/*.ts",
"../src/lib/directives/**/*.ts",
"../src/lib/services/**/*.ts",
"../src/lib/models/**/*.ts",
"../src/lib/pipes/**/*.ts",
"../../../src/app/openvidu-webcomponent/**/*.ts",
],
"exclude": [
"src/test.ts",
"../src/lib/**/*.mock.ts",
"../src/lib/**/*.spec.ts",
],
}

View File

@ -10,6 +10,7 @@
}, },
"exclude": [ "exclude": [
"src/test.ts", "src/test.ts",
"**/*.spec.ts" "**/*.spec.ts",
"**/*.mock.ts"
] ]
} }

View File

@ -1,15 +0,0 @@
{
"include": [
"../../projects/openvidu-angular/src/lib/components/**/*.ts",
"../../projects/openvidu-angular/src/lib/directives/**/*.ts",
"../../projects/openvidu-angular/src/lib/services/**/*.ts",
"../../projects/openvidu-angular/src/lib/models/**/*.ts",
"../../projects/openvidu-angular/src/lib/pipes/**/*.ts",
"../app/openvidu-webcomponent/**/*.ts"
],
"exclude": [
"src/test.ts",
"../../projects/openvidu-angular/src/lib/**/*.mock.ts",
"../../projects/openvidu-angular/src/lib/**/*.spec.ts"
],
}