summaryrefslogtreecommitdiffstats
path: root/lib/book.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/book.js')
-rw-r--r--lib/book.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/book.js b/lib/book.js
index 400296e..a678181 100644
--- a/lib/book.js
+++ b/lib/book.js
@@ -92,6 +92,20 @@ function Book(opts) {
// List of page in the book
this.pages = {};
+ // Deprecation for templates
+ Object.defineProperty(this, 'options', {
+ get: function () {
+ this.log.warn.ln('"options" property is deprecated, use config.get(key) instead');
+ var cfg = this.config.dump();
+ error.deprecateField(cfg, 'book', (this.output? this.output.name : null), '"options.generator" property is deprecated, use "output.name" instead');
+
+ return cfg;
+ }
+ });
+
+ // Loop for template filters/blocks
+ error.deprecateField(this, 'book', this, '"book" property is deprecated, use "this" directly instead');
+
_.bindAll(this);
}