Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinceMerluza committed Jan 3, 2024
1 parent adc1802 commit 5c583ab
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 94 deletions.
56 changes: 30 additions & 26 deletions blueprint/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,30 @@ All of the API methods return a promise, but if you want to work with observable
}
```

### Prepare your copy of the sample Angular app
### Run the sample Angular app hosted in Github

You can run the sample Angular app locally or from the blueprint repo.

:::primary
**Note**: Regardless of where you run the sample Angular app from, you need a Genesys Cloud user account in order for it to work.
:::

To run the sample Angular app from the blueprint repo:

1. Click [here](https://genesyscloudblueprints.github.io/angular-app-with-genesys-cloud-sdk/ "Goes to the sample Angular app").

2. If you're on a different region than `us-east-1` (mypurecloud.com), add an `environment` query parameter to the URL and enter your Genesys Cloud environment.

For example:

```bash
https://genesyscloudblueprints.github.io/angular-app-with-genesys-cloud-sdk/?environment=mypurecloud.com.au
```

For more information, see [Platform API](/api/rest/ "Goes to the Platform API page in the Genesys Cloud Developer Center").


### Run the sample Angular app locally

1. Clone the [blueprint repo](https://github.com/GenesysCloudBlueprints/angular-app-with-genesys-cloud-sdk "Goes to the blueprint repo in Github") to your local machine:

Expand Down Expand Up @@ -122,28 +145,12 @@ All of the API methods return a promise, but if you want to work with observable
};
```

### Run the sample Angular app

You can run the sample Angular app locally or from the blueprint repo.

:::primary
**Note**: Regardless of where you run the sample Angular app from, you need a Genesys Cloud user account in order for it to work.
:::

To run the sample Angular app from the blueprint repo:

1. Click [here](https://genesyscloudblueprints.github.io/angular-app-with-genesys-cloud-sdk/ "Goes to the sample Angular app").

2. If you're on a different region than `us-east-1` (mypurecloud.com), add an `environment` query parameter to the URL and enter your Genesys Cloud environment.

For example:
4. Serve the Angular app locally:

```bash
https://genesyscloudblueprints.github.io/angular-app-with-genesys-cloud-sdk/?environment=mypurecloud.com.au
ng serve
```

For more information, see [Platform API](/api/rest/ "Goes to the Platform API page in the Genesys Cloud Developer Center").

## Implementation steps

Follow these instructions to include the Genesys Cloud Javascript Platform SDK in your own Angular project.
Expand Down Expand Up @@ -176,13 +183,7 @@ For more information, see [Create an OAuth client](https://help.mypurecloud.com/
npm install -g @angular/cli
```

2. Serve the Angular app locally:

```bash
ng serve
```

3. Create a new Angular 12 project:
2. Create a new Angular 12 project:

```bash
ng new name-of-your-app
Expand Down Expand Up @@ -224,13 +225,16 @@ For more information, see [Create an OAuth client](https://help.mypurecloud.com/

iii. In the `scripts` property add `node_modules/purecloud-platform-client-v2/dist/web-cjs/purecloud-platform-client-v2.min.js`

iv. Change the key of the `browser` entry to `main`.

The modified `build` property should look like this:

```json
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
...,
"main": "src/main.ts",
"customWebpackConfig": {
"path": "./extra-webpack.config.js",
"mergeRules": { "externals": "prepend" }
Expand Down
4 changes: 0 additions & 4 deletions genesys-cloud-sample/.vscode/extensions.json

This file was deleted.

20 changes: 0 additions & 20 deletions genesys-cloud-sample/.vscode/launch.json

This file was deleted.

42 changes: 0 additions & 42 deletions genesys-cloud-sample/.vscode/tasks.json

This file was deleted.

4 changes: 2 additions & 2 deletions genesys-cloud-sample/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumWarning": "2mb",
"maximumError": "4mb"
},
{
"type": "anyComponentStyle",
Expand Down

0 comments on commit 5c583ab

Please sign in to comment.