A core component of anvil required to function as expected.
anvil will install this extension during post-install.
This extension will read the output path or list of output paths. For each path in the output path, all output will be copied relative to their source path structure.
/src
| a.js
| b.css
| c.html
| - subdir
| d.js
| e.css
| f.html
{
"output": "lib"
}
output structure
/lib
| a.js
| b.css
| c.html
| - subdir
| d.js
| e.css
| f.html
{
"output": [ "lib", "site" ]
}
output structure
/lib
| a.js
| b.css
| c.html
| - subdir
| d.js
| e.css
| f.html
/site
| a.js
| b.css
| c.html
| - subdir
| d.js
| e.css
| f.html
You can further control what build files get copied to where using an object to control output.
In the object format, the full property can be a single string or a list of strings for full output behavior as described previously.
The partial property is a hash where the key is a minimatch (glob) format of the files to be copied and the value is a path or paths to copy all matched files to.
/src
| a.js
| b.css
| c.html
| - subdir
| d.js
| e.css
| f.html
{
"output": {
"parital": {
"**/*.js": "js"
}
}
}
output structure
/js
| a.js
| b.js
Note: the files copied using partial do not retain the structure they were pulled from.
{
"output": {
"full": "lib"
"partial": {
"**/*.css": "css",
"**/*.html": "html"
}
}
}
output structure
/lib
| a.js
| b.css
| c.html
| - subdir
| d.js
| e.css
| f.html
/css
| b.css
| e.css
/html
| c.html
| f.html