gitbook-cli
gitbook-cli copied to clipboard
Support option for custom output directory
Allows different directory structures, simplifying the use of other tools (such as watching everything in a /src
folder and building to a /dist
folder).
+1
I’m currently integrating Gitbook (using frontend-maven-plugin
and exec-maven-plugin
) into a Maven build and it would be great if I could follow Maven’s conventions (sources in src/main/gitbook
, output in target/classes
). A --ouput
option would thus be most helpful.
FWIW, it looks like this option was part of an earlier version of Gitbook: https://github.com/GitbookIO/gitbook/commit/a8e026a642b6780e01e1c94be9345a01a10018c6. I wonder why it was removed?
@orlade @sewe This is possible by providing a second argument to the build command:
$ gitbook build src dest
https://github.com/GitbookIO/gitbook/blob/master/lib/cli/getOutputFolder.js#L12
@johnthepink Many thanks for the pointer. Totally missed the [output]
in the synopsis shown by gitbook help build
and then was led astray by Google’ing, which turned up only the now-gone --output
option.
Maybe close the issue, since it is already resolved?
Hi guys, take a look at my answer in the gitbook repo for a simple idea how to setup the gitbook with a package.json
file and use the npm start/build
approach to the gitbook.