Methods
mosaic(config) → {Promise.<void>}
Parameters:
Name | Type | Description |
---|---|---|
config |
Config |
Returns:
- Type
- Promise.<void>
Type Definitions
Config
Mosaic configuration
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
input |
Object.<string, string> | a dictionary of key value pairs where key is the name of a set of files and value is a glob pattern describing the location of those files on disk | |
transform |
Array.<function()> | an array of functions to be called in series in order to transform the input | |
output |
OutputMapFn | a function that takes the output of the transform pipeline and then returns an FileObject array representing the files to be saved to disk | |
serve |
Server |
<optional> |
optionally serve files using an express server |
FileObject
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
filepath |
string | the location of the file on disk |
content |
string | the file content |
OutputMapFn
Server
Type:
- object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
port |
string |
<optional> |
3000 | the port to serve on |
staticPath |
string |
<optional> |
An optional static path | |
routes |
Object.<string, string> | A dictionary of key value pairs, where each key is the name of a route path, and the value is the string content that should be served for that route |