24.5.0-rc.0 • Published 4 days ago
khoros-aurora-sdk v24.5.0-rc.0
Using the Aurora SDK
Start by ensure you have NodeJS installed. Node versions 16 and 17 are currently supported. Using NVM
(https://github.com/nvm-sh/nvm) will make it easier to use newer version of NodeJS in the future. If you have
NVM installed, simply run nvm use
in the terminal to ensure you're using the correct version of NodeJS.
Once NodeJS is installed, open a terminal shell, and run npm i
from this directory . This will ensure the
necessary dependencies are available, including the Aurora SDK.
Setting up the environment
- In a text editor, edit the
.env.local
file in the root your plugin's filesystem. If you don't see it, note that the file may be hidden by default by your OS (Mac: https://www.macworld.com/article/671158/how-to-show-hidden-files-on-a-mac.html, Windows: https://support.microsoft.com/en-us/windows/view-hidden-files-and-folders-in-windows-97fbc472-c603-9d90-91d0-1166d1d9f4b5). If you still don't see this file, create it. - Add an entry for
LIA_URL
. This is the base URL of your community (for example,LIA_URL=https://community.bigco.com
) - Add an entry for
SDK_KEY
to be the value of the SDK Key found in the Dev Tools (/admin/dev
) section of your community's admin console (for example,SDK_KEY=abcd1234
) - Save your changes to the
.env.local
file.
Using Plugin Preview
Plugin Preview synchronizes the assets in your plugin with your community. The changes are kept in memory and are only visible to admin users.
- 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.
- On Plugin Preview startup, any currently changed files are synced into memory. All changes are cleared from memory once the Plugin Preview process is stopped. The process can be stopped using
Ctrl-C
.
Developing a Custom React Component
- Set up your SDK environment and ensure you have Plugin Preview configured correctly
- If it doesn't exist already, copy over the
src/components/ReactComponent
directory from https://github.com/community-khoros-internal/aurora-plugin-template to your plugin's filesystem - Commit and push these changes to a branch of your plugin of your choosing
- Create a pull request to pull these changes into the main branch of your plugin (
<phase>-main
, notmain
) - Once the pull request is merged, in a browser, go to Designer in the admin console of your community
- From there, go to "Page Templates" and select the page where you want to add the custom component
- Click on the "+" symbol to add the component, then select "Custom" under "Other"
- Select "ReactComponent". This will add a simple React component to your page's quilt.
- Click Save and Publish
- In the browser, navigate to the page where the component was published
- In a new terminal shell, run
npm run dev
. This will start the dev server process. The process can be stopped usingCtrl-C
. - In your browser, reload the page with the component . The sample React component should now load from your local dev server (http://localhost:3002).
- Edit the
src/components/ReactComponent/Component.tsx
file. - In your browser, reload the page with the component. Your changes should be reflected on the component.
- All changes are cleared once the dev process is stopped. Also note that the temporary changes are only visible while you are logged in.
- To continue development on a separate branch, create a new branch of your plugin from
qa-main
. - Once this is done, you can safely remove the custom component from the page where it was added using Designer. It will still appear on the page as long as you specify your branch as the Active Branch in Dev Tools (
/admin/dev
in your community).
24.5.0-rc.0
4 days ago
24.4.4
8 days ago
24.4.3-rc.1
17 days ago
24.4.3-rc.0
19 days ago
24.4.1
1 month ago
24.4.2
30 days ago
24.4.0
1 month ago