arachne.assets.dsl

User-facing DSL functions for init scripts

input-dir

(input-dir <arachne-id> dir & opts)
Define a asset producer component that reads from a directory on the file
system. The path maybe absolute or process-relative. Returns the entity ID of
the component.

Arguments are:

- arachne-id (optional): the Arachne ID of the component
- dir (mandatory): the directory to read from
- opts (optional): map (or kwargs) of additional options

Options currently supported are:

- :watch? - should the input watch for changes in the directory? Defaults to false.
- :classpath? - true if the given directory is relative to the current classpath, rather than the current project

Returns the entity ID of the newly created component.

output-dir

(output-dir <arachne-id> dir)
Define a asset consumer component that writes to a directory on the file system.

Arguments are:

- arachne-id (optional): The Arachne ID of the component
- dir (mandatory): The directory of the component

Returns the entity ID of the newly created component.

pipeline

(pipeline & tuples)
Wire together asset pipeline components into a directed graph, structuring the flow of assets through the pipeline.

The arguments are any number of tuples. The structure of each tuple is:

[<producer> <consumer> <roles?>]

<producer> and <consumer> may be Arachne IDs or entity IDs.

In every tuple, <producer> and <consumer> are mandatory, <roles> is optional.

Each tuple establishes a producer/consumer relationship between the pipeline components, and
(if roles are present) specifies the role of the producer to the consumer, which is required by
some consumers.

transducer

(transducer <arachne-id> ctor)
Define an asset consumer/producer component that applies a Clojure transducer filesets that pass through it.

Arguments are:

- arachne-id (optional): The Arachne ID of the component
- ctor (mandatory): the fully-qualified symbol of a function that, when invoked and passed the
  initialized component instance will return a transducer over FileSets.

  Returns the entity ID of the newly created component.