Closed colingourlay closed 1 year ago
@drzax aunty config values for build
, serve
and deploy
are long-overdue. I've just added a table of build
props, but once this is merged, will also add the other two. I've also removed the usage examples for just build::entry
from the docs, now that we're putting definitions all in one place.
Ah screw it, there's no time like the present. We now have documentation for all 3 commands' config options.
This allows the definition of multiple static directories, by setting your aunty config's
build->staticDir
property to an array of strings.@thomasbrettell asked for a way to use some static assets while developing locally, but exclude them from versioned production releases. This is also a problem I've tried to hack around in the past (during projects like the Aus Talks data explorer and our COVID charts).
Example usage
A common pattern this would be great for would be serving a local directory of data files during development, but pushing those files to a location under
/dat/
on ContentFTP (before publication), and forking which endpoint to reference using theNODE_ENV
environment variable.Assuming you had this file in your project:
/data/big-chunk-o-data.csv
...In
aunty.config.js
:In
src/index.js
: