Skip to content

Commit

Permalink
Update CDN section of readme
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos committed May 29, 2020
1 parent 501fc18 commit 1c185ab
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ The Plug JS provides the building blocks for crafting personalized experiences.
We currently offer two ways to install the library.

## CDN
Add the following line to the `<head>` tag of your HTML document, replacing the `<APP_ID>` with the public app ID:
Add the following line to the `<head>` tag of your HTML document:

```html
<script src="https://cdn.croct.io/app/<APP_ID>/js/v1/croct.js"></script>
<script src="https://cdn.croct.io/js/v1/lib/plug.js"></script>
```

In production, it is recommended to use the application specific tag, replacing the `<APP_ID>` with the public app ID:

```html
<script src="https://cdn.croct.io/js/v1/lib/plug.js?appId=<APP_ID>"></script>
```

This guarantees the application will always use the latest version of the library.
Rember

## NPM
[NPM](https://npmjs.com) is the recommended installation method when building large scale applications with Croct. It pairs nicely with module bundlers such as Webpack or Browserify and includes Typescript typings.
Expand Down

0 comments on commit 1c185ab

Please sign in to comment.