When the file or directory being converted has an ancestor directory with a then all of the following conversions produce the same output:
ourbigbook.json file, then your current working directory does not have any effect on OurBigBook output. For example if we have:/project/ourbigbook.json
/project/index.bigb
/project/subdir/index.bigb- directory conversion:
cd /project && ourbigbook .cd / && ourbigbook projectcd project/subdir && ourbigbook ..
- file conversion:
cd /project && ourbigbook index.bigbcd / && ourbigbook project/index.bigbcd project/subdir && ourbigbook ../index.bigb
When there isn't a
ourbigbook.json, everything happens as though there were an empty ourbigbook.json file in the current working directory. So for example:- outputs that would be placed relative to inputs are still placed in that place, e.g.
index.bigb -> index.htmlalways stay together - outputs that would be placed next to the
ourbigbook.jsonare put in the current working directory, e.g. the_outdirectory
Internally, the general philosophy is that the JavaScript API in index.js works exclusively with paths relative to the project toplevel directory. It is then up to callers such as ourbigbook to ensure that filesystem specifics handle the relative paths correctly.