Closed thruflo closed 1 year ago
I think this is a great improvement to have electric init
generate the initial configuration and everything is built from that.
It is also an opportunity to simplify migrations import and get rid of import { data as bundle } from './migrations/dist'
, or at least have this pre-configured on the generated file.
Need to change the base branch so it doesn't include #20
The point of this is to enable to file to be loaded by Javascript code using the default builder plugins, such as https://esbuild.github.io/content-types/#json
Given that it is a JSON file, if we give it the
.json
ending, then it's trivially importable by Javascript code. If not, then we and users need to faff around with custom loader config to treat the file as JSON.The payoff for this is large: we get to just configure the
app
identifier once, usingelectric init
and then setup all the examples to load the config fromelectric.json
. That removes a bunch of duplication in the instructions.Warning: we need to coordinate before merging this to align the examples and the documentation with the new filename.