Open HakS opened 5 years ago
Hmm, should update those docs. It currently takes an nconf object to allow multiple config locations.
const Kalastatic = require('kalastatic')
const nconf = require('nconf')
nconf.file('config.json')
const kstat = Kalastatic(nconf)
kstat.build().then(function () {
console.log("DONE!")
})
We could make it take an options array, or a base path, instead. Might make it easier to set up on the API side.
That's a good idea! Other thing that might work would be to look for a config file in the root of the node script being perhaps? load this config and send it to Kalastatic
But I guess that's another ticket
I can't figure out how to use KalaStatic in a node script, it says it needs a path in the parameter like thi
KalaStatic('path/to/site')
, however this wouldn't work, since in the source it accepts something like an object, which has a methoddefaults()
, and I can't find anything about how to build this object this KalaStatic function expects.