README STILL IN WRITING PROCESS
Welcome to the gitbook-setup package
Imagine to build...
$ npm install -g gitbook-setup
$ gitbook-setup [help]
$ npm install --save gitbook-setup
var gitbook_setup =var info =name: "title"deploys: "heroku"gitbook_setup
Optionally info can have a path variable to create the document at that path:
var gitbook_setup =var info =name: "title"deploys: "heroku"path: "/home/rudy/Desktop/Docs/"gitbook_setup
You have now three options for creating a book:
- Passing book configuration through arguments.
- Giving a file with the whole configuration.
- In interactive form. The program will ask you for all information.
The creation of a book by interactive form is the most user-friendly. The argument form of creation is useful when you want to create a lot of books for example and fast for students. The file method of creation could be useful when you want to send through the network the book information to create it in other place for example I could send a file configuration to China and there they can create the book.
To create a book you have to execute
> gitbook-setup create [interactive | args | file -f <filename> ]
If you want to create a book by arguments you have these fields:
- -n bookname (required)
- -t book (default) | api | faq | own:moduleName
- -d heroku | gh-pages | moduleName
- -a author/s
- -i description
Example 1 - Simplest book
> gitbook-setup create args -n Sample
Example 2 - Simplest book with my own template
> gitbook-setup create args -n Sample -t own:myTemplate
Example 3 - Book deployed to Heroku
> gitbook-setup create args -n Sample -d heroku
Example 4 - Book deployed to Heroku and gh-pages
> gitbook-setup create args -n Sample -d heroku,gh-pages
Example 5 - Book titled 'Our Piano History' with the template 'Classical Sheets', deployed to heroku, gh-pages and my server 'BestMusic', written by Frederic Chopin and Sergei Rachmaninoff and with some description about the book
> gitbook-setup create args -n 'Our Piano History' -t own:'Classical Sheets' -d heroku,gh-pages,BestMusic -a 'Frederic Chopin','Sergei Rachmaninoff' -i 'Amazing story about our piano lifes'
If you saw the output of the previous examples you have to create a file with the identical content. For example you want a book title myBook that allows deployment to heroku you have to create a file like that:
This file will create the same book:
Because by defaut the type is book.
The field name is a requirement. All other fields are optional.
The program will just ask you for all fields and you will fill them.