Skip to content

Commit

Permalink
Update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
belefuu committed Feb 21, 2022
1 parent 6dfdbba commit 59a00f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,40 @@

## Overview

The SAS Content SDK is a set of JavaScript APIs and web components that enables accessing content from a SAS Viya deployment in a third-party application or web page. Content Areas displaying tiles representing SAS content can be embedded for selection or launching into SAS solutions. This functionality is delivered as the `content-sdk-components` JavaScript
library.
The SAS Content SDK enables you to use the power of SAS Viya in your own websites and HTML applications.
You can embed tiles representing content items with the `<sas-content-area>` custom HTML element.

## Prerequisites

Access to a deployment of SAS Viya 4.0.1 (or later) is necessary in order to use the SDK. For more information about server set up, see <a target="_blank" href="https://developer.sas.com/sdk/content/docs/getting-started#sas-viya-setup">SAS Viya setup</a>.

## Installation

### NPM

The <a target="_blank" href="https://www.npmjs.com/package/@sassoftware/content-sdk">`@sassoftware/content-sdk`</a> library is published to NPM and can be installed by running the `npm install` command as shown below. `content-sdk-components` does not support ES6 imports. Therefore, the contents of the `content-sdk-components/dist` folder must be deployed with your page, and then loaded using a `script` tag.
The <a target="_blank" href="https://www.npmjs.com/package/@sassoftware/content-sdk">`@sassoftware/content-sdk`</a> library is published to NPM and can be installed by running the `npm install` command as shown below. `content-sdk` does not support ES6 imports. Therefore, the contents of the `content-sdk/dist` folder must be deployed with your page, and then loaded using a `script` tag.

```bash
# From the root directory of your project
npm install @sassoftware/content-sdk

# Copy the contents of the package to an asset folder for deployment
cp -r ./node_modules/@sassoftware/content-sdk ./sdk-assets
cp -r ./node_modules/@sassoftware/content-sdk ./sdk-assets/content
```

The library can then be loaded out of the deployed assets folder using a `script` tag.

```html
<script async src="./sdk-assets/dist/umd/content-sdk-components.js"></script>
<script async src="./sdk-assets/content/dist/umd/content-sdk-components.js"></script>
```

### CDN (Content Delivery Network)

Accessing the `content-sdk-components` library from a CDN is easy. It does not require installation or
Accessing the `content-sdk` library from a CDN is easy. It does not require installation or
hosting of the library code and assets. There are several public options for accessing NPM content through a CDN, such
as <a target="_blank" href="https://unpkg.com/">UNPKG</a> and <a target="_blank" href="https://www.jsdelivr.com/">jsDelivr</a>. Here is an example of loading the 0.1.0 version of `content-sdk-components` from UNPKG
as <a target="_blank" href="https://unpkg.com/">UNPKG</a> and <a target="_blank" href="https://www.jsdelivr.com/package/npm/@sassoftware/content-sdk">jsDelivr</a>. Here is an example of loading the 0.1.0 version of `content-sdk` from UNPKG
using an HTML `script` tag. When used in production, the version should be pinned to the full `major.minor.patch` semantic version.

```html
<script async src="https://unpkg.com/@sassoftware/content-sdk@0.1.0/dist/umd/content-sdk-components.js"></script>
<script async src="https://unpkg.com/@sassoftware/content-sdk/dist/umd/content-sdk-components.js"></script>
```

## Getting Started
Expand Down
7 changes: 2 additions & 5 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@

## Examples

- [ContentAreaElement](./ContentAreaElement.html) (<a target="_blank" href="https://developer.sas.com/sdk/content/docs/api/ContentAreaElement">docs</a>)
- [ContentSDKWithReport](./ContentSDKWithReport.html) (<a target="_blank" href="https://developer.sas.com/sdk/content/docs/api-reference/">docs</a>)

Uses the `<sas-content-area>` custom element to display a set of tiles representing content items.

- [ContentAreaElementWithReport](./ContentAreaElementWithReport.html) (<a target="_blank" href="https://developer.sas.com/sdk/content/docs/api/ContentAreaElement">docs</a>)

Uses the `<sas-content-area>` and `<sas-report>` (from the <a target="_blank" href="https://developer.sas.com/sdk/va/docs/getting-started">VA SDK</a>) to display a set of tiles representing reports. Selecting a report tile will update the report being displayed below.
Uses the `<sas-content-tree>`, `<sas-content-breadcrumb>`, and `<sas-content-area>`, along with a `<sas-report>` (from the <a target="_blank" href="https://developer.sas.com/sdk/va/docs/getting-started">VA SDK</a>) to display a set of tiles representing reports. Selecting a report tile will update the report being displayed below.

0 comments on commit 59a00f1

Please sign in to comment.