configuration format and helpers to process and concatenate files from multiple sources.
part of sph-lib
for example to compile from many files in different preprocessor formats into one target format file.
features
configuration for all processors
process file always, only if source file is newer or only if destination file doesnt exist
match files by suffix or custom procedure
option to automatically create destination filenames
data structures
config: hashtable:{symbol:output-format -> (config-output config-input ...)}
config-output: #(symbol:id string:suffix false/procedure:processor-output)
config-input: #(symbol:name source-match? false/procedure:processor-input)
config-format: (config-output config-input ...)
source-match? :: boolean/procedure:{any:source -> boolean}
processor-input :: source-element port:output any:processor-options ->
processor-output :: procedure:input->port port:output-port any:processor-options ->
sources: (any:processor-dependent ...)
syntax
ac-config :: (out-id suffix out-proc) (in-id matcher in-proc) ... -> hashtable
ac-config-input :: id matcher processor -> vector
ac-config-output :: id suffix processor -> vector
example config
(define my-ac-config
(ac-config
( (html ".htm" (l (process-input out-port options) (process-input out-port)))
(html #t (l (source out-port options) (file->port source out-port)))
(sxml #t s-template-sxml->html))
( (js #t js-output-processor)
(js #t ac-input-copy)
(sjs #t s-template-sescript->js))))
(sph filesystem asset-compiler)