gitbook-cli icon indicating copy to clipboard operation
gitbook-cli copied to clipboard

Support option for custom output directory

Open orlade opened this issue 9 years ago • 5 comments

Allows different directory structures, simplifying the use of other tools (such as watching everything in a /src folder and building to a /dist folder).

orlade avatar Jan 11 '16 05:01 orlade

+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?

sewe avatar Aug 17 '16 15:08 sewe

@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 avatar Aug 19 '16 18:08 johnthepink

@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.

sewe avatar Aug 22 '16 07:08 sewe

Maybe close the issue, since it is already resolved?

tkurki avatar Sep 11 '16 13:09 tkurki

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.

marcopeg avatar Jul 10 '18 07:07 marcopeg