summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-02-03 10:52:39 +0100
committerSamy Pessé <samypesse@gmail.com>2015-02-03 10:52:39 +0100
commit1eea994e731331118dcbbf6c0ed576c358b0df0a (patch)
treea7fd51fb544627e9293e129898601e4479509e44
parent8a597ff3f18aa1dfa755ff21115e082e33374c9c (diff)
downloadgitbook-1eea994e731331118dcbbf6c0ed576c358b0df0a.zip
gitbook-1eea994e731331118dcbbf6c0ed576c358b0df0a.tar.gz
gitbook-1eea994e731331118dcbbf6c0ed576c358b0df0a.tar.bz2
Fix init command
-rw-r--r--README.md3
-rw-r--r--lib/book.js8
2 files changed, 6 insertions, 5 deletions
diff --git a/README.md b/README.md
index 6b1a80a..40d10d5 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,8 @@ GitBook can be installed from **NPM** using:
$ npm install gitbook-cli -g
```
-Create the directories and files for a book from its [SUMMARY.md](https://github.com/GitbookIO/gitbook#book-format) file using
+Create the directories and files for a book from its [SUMMARY.md](https://github.com/GitbookIO/gitbook#book-format) file (if existing) using
+
```
$ gitbook init
```
diff --git a/lib/book.js b/lib/book.js
index 5099291..d907740 100644
--- a/lib/book.js
+++ b/lib/book.js
@@ -712,10 +712,10 @@ Book.init = function(root) {
}, []);
};
- book.log.infoLn("init book at", root);
+ book.log.info.ln("init book at", root);
return fs.mkdirp(root)
.then(function() {
- book.log.infoLn("detect structure from SUMMARY (if it exists)");
+ book.log.info.ln("detect structure from SUMMARY (if it exists)");
return book.parseSummary();
})
.fail(function() {
@@ -748,7 +748,7 @@ Book.init = function(root) {
return fs.exists(absolutePath)
.then(function(exists) {
- book.log.infoLn("create", chapter.path);
+ book.log.info.ln("create", chapter.path);
if(exists) return;
return fs.mkdirp(path.dirname(absolutePath))
@@ -759,7 +759,7 @@ Book.init = function(root) {
}));
})
.then(function() {
- book.log.infoLn("initialization is finished");
+ book.log.info.ln("initialization is finished");
});
};