How to install the SDK in a local development environment
The Aurora SDK allows you to customize various plugin points using a Git repository for your community. You can preview changes made to the repository through Aurora's Plugin Preview tool, which uses Node to synchronize your local development environment with your repository so that you can preview changes in your staging Community instance.
Prerequisites
Your development environment needs to have NodeJS installed in order to work with Aurora's SDK.
Downloading the SDK
The Aurora SDK is publicly published and available through npmjs. You can install the package using the following command in terminal:
npm i khoros-aurora-sdk
The SDK package includes Plugin Preview, a tool that synchronizes your local development environment with your plugin repository.
Setting Up Plugin Preview
- Clone your community's plugin repository from GitHub into a local directory (for example, ~/development/plugin/exampleco).
- Locate the file named .env.local in this directory. If you don't see it, note that the file may be hidden by default by your OS (Mac, Windows).
- Open the .env.local file in a text editor and make the following changes:
- Set PLUGIN_REPO_PATH to be a relative path to where you cloned your plugin (for example,
../plugin/exampleco
). - Set LIA_URL to be the base URL of your community (for example,
https://community.exampleco.com
). - Set SDK_KEY to be the value of the SDK Key found in the Dev Tools section of your community's admin console (for example,
https://community.exampleco.com/admin/dev
).
- Set PLUGIN_REPO_PATH to be a relative path to where you cloned your plugin (for example,
- Save your changes to the .env.local file.
Note: If you don't see a .env.local file, note that the file may be hidden by default by your OS (Tips: Mac, Windows). If you still don't see this file, create it.
Caution: The SDK Key can only be generated within the Dev Tools area of the admin for the Staging instance of your Community.
Starting Plugin Preview
- Open a Terminal shell and run
npm run start
. This will start the Plugin Preview process.
At this point, any changes you make to the files in your plugin repository will be synchronized with your community. Reload the page in the community where the asset is used to see the changes. To undo the changes, revert the file you changed.
ATLAS
Comments