Docs
Declarations
Examples
Local resource

Local Resource

A local resource is a resource stored within the project. This can take the form of a file, a folder, an image, a configuration file, etc.

Declaration

To declare a local resource, simply specify in the source field the path to the resource relative to the .aml file in which the declaration appears. For example, if you have a file image.png and it is located in the same folder as the .aml file in which you declare the resource, you can specify source: image.png.

    • .aiop
      • .aml
      • image.png
  • resources/.aml
    - source: image.png
      destination: destination_in_the_package/image.png
      compatibility:
        - ...

    Of course, you can load any type of file, not just images, and also folders. In this case, you can add all the folders and files it contains:

    • .aiop
      • .aml
        • image.png
  • resources/.aml
    - source: folder/
      destination: destination_in_the_package/
      compatibility:
        - ...

    Declare Multiple Sources

    Since v0.12.0, AIOP introduced the possibility of using the & key to declare multiple sources at once. This allows you to simplify your configuration and avoid repeating the same values. You can reference as much as files you are capable with the & key.

    • .aiop
      • .aml
        • file1
        • file2
  • resources/.aml
    - source: folder1/file1 & folder2/file2
      destination: dest_folder/

    AIOP will retrieve the file1 and file2 from their respective folders and add them to the source list to be copied into the dest_folder. The dest_folder will look like this:

      • file1
      • file2