Skip to content

Project info file

Giorgio Garofalo edited this page Jan 29, 2024 · 7 revisions

If you're planning on compiling a specific image often, it might be handy to save the project details somewhere. Project info files are simple, optional, YAML configurations that contain the properties and commands that should be passed to the compiler.

This is what an example file looks like:

# This is a sample project.yml file.

properties:
  - source: source.png
  - output: out
  - colors: colors
  - targets: jvm
  - jvmcompiler: path/to/kotlinc

commands:
  - --nocompile
  - --printoutput
  - --interpret

# Tasks are optional lists of sub-projects just like above.
# Tasks are run via -Dtask=name
tasks:
  - paint: # This is the task name
      properties:
        - colors: my_color_scheme
      commands:
        - --imgoutput: repainted.png
        - recolorize

In short, properties contains all the parameters that are passed with the -D prefix, while commands features all the supported arguments. Both are optional. Additional properties and arguments passed via the command line override these settings.

tasks is an optional list that stores jobs that can be easily run.

A project file is loaded by Pikt by passing the -Dproject=my_file property (without the .yml extension).
A task can be run via -Dtask=task_name.