Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

So you’re writing an interface and you make some useful routines and then you realize that you’d like to use this library in other components.

How do you do this?

You can create libraries which are then re-usable from any other Iguana X component.

 Step 1: Add a component using green [+ COMPONENT] button

Create a Component

Assuming you already have Installation taken care of.

Components are created in the Dashboard, using the the [+COMPONENT] button.

 STEP 1: Go to the dashboard and click +Component
image-20231117-212034.png
 STEP 2: Select a component, name it and describe it

You can click on Learn More in the component description to access its documentation. All of the iNTERFACEWARE Collections components are documented for your reference.

  1. Select a component

  2. Name your component

  3. Add Tags

  4. Click to Add the component

Notice you can also filter the components displayed by Collection - use the All Collections dropdown to select the Collection you want to display.

 STEP 3: Click on the component to open its component card - note the Name, Description and Tags

Tags are used to categorize and add functionality to components. For example, #autostart is used by IguanaX to determine if components should be automatically started when the IguanaX server starts up.

See Component Cards for more information.

 STEP 4: Configure custom fields on the component

Many components have Custom Fields which you can edit and set by clicking the ellipsis beside each one. The idea is that many components need to be configured for the environment they are in without the need to fully Edit a Component.

 STEP 5: Stop and start the component using the button in the top left corner of the card

You can start and stop components using the button in the top left corner:

You can also do it from the list of components on the left of the dashboard and using Bulk Actions in the dashboard.

 STEP 6: Link the components together

When one component feeds into another component, it’s linked by a queue where data is securely stored on disc and fed into the next component. Click Edit Connections and follow the steps here: Edit Connections.

That shows the core operation of IguanaX. The real power comes from being able to Edit a Component.

 Step 2: Make sure it has an upstream repo

Set an upstream repository & Set upstream Git repo

Unable to render {include} The included page could not be found.
 Step 3: Create a directory FOO
  • Click the Create Folder icon

  • Enter the folder name and click and click the green [CREATE] button

  • You should see something like this:

 Step 4: Create a file BAR.lua in the FOO directory and add a function
  • Select the Create File menu optin on the FOO folder

  • Enter the folder name and click and click the green [CREATE] button

  • Create a function in the BAR.lua file, you can paste this example:

  • function FOObar()
       return "The world needs more FOO";
    end
  • You should see something like this:

 Step 5: Commit the changes and push them to the upstream repo
  • Click the Commit changes toolbar button

  • The commit dialogue will open, enter a commit message and click the green [COMMIT] button

  • Click the Push changes to remote toolbar button

  • The upstream repository will look something like this:
    NOTE: FOO is currently just a folder

 Step 6: Convert FOO to a library by right clicking on it and choosing the "Create Library" menu option
  • Open the folder menu by right clicking on FOO, or clicking the 3 dot menu

  • Choose Create Library to convert the FOO folder into a Library

  • Click the green [CREATE] button in the confirmation dialogue

  • This will bring you to the Repository Management dialogue

  • Once you are in the Repository Management screen you can set your upstream repository

    • Enter the name (also called a slug) for the repository

      • To create a new repository enter a repo name (slug) that does not exist yet

      • Click the [CONFIRM CHANGE] button to connect or create

It is possible to connect to an existing repository in the Repository Management dialogue – but we strongly recommend against this as there a few, if any, scenarios where this would be useful.

 Step 7: Commit and push the FOO library changes

See Step 5 for detailed screenshots (the first three steps below are the same)

  • Click the Commit changes toolbar button

  • The commit dialogue will open, enter a commit message and click the green [COMMIT] button

  • Click the Push changes to remote toolbar button

  • The component upstream repository will look something like this:
    NOTE: Notice that FOO was converted from a folder (in step 3) to a reference to the FOO library

  • The FOO library upstream repository will look something like this:
    NOTE: That the the FOO library should have the BAR.lua file in it.

 Step 8: Now import the FOO library into another component using the FOO library URL
  • Get the FOO library URL

    • Choose View Remote menu option for the FOO library

    • Right click on the URL to copy URL

  • Edit the target component in the Translator

    • This is the component you will add the FOO library into

  • Click the Add library button to open the Import Library dialogue

  • Enter the FOO library details in the LIBRARY DETAILS section of the Import Library dialogue

    • Type in the library name FOO

    • Paste the URL you copied above into the GIT url field

    • Click the green [IMPORT] button to import the library

    Screen Recording 2023-11-10 at 18.46.24.mov

  • No labels