diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-25 14:41:46 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-25 14:41:46 +0100 |
commit | 1ba63675d5f3c97a76861af81cdf23013e551c47 (patch) | |
tree | 0ebbc09d6b744c67b41384b09a398a8f53948e70 /lib/plugins/context.js | |
parent | 32f52f2d955ffa0080ad366910567962d178d78b (diff) | |
download | gitbook-1ba63675d5f3c97a76861af81cdf23013e551c47.zip gitbook-1ba63675d5f3c97a76861af81cdf23013e551c47.tar.gz gitbook-1ba63675d5f3c97a76861af81cdf23013e551c47.tar.bz2 |
Support "sections" from gitbook 2 as deprecated for page hooks
Diffstat (limited to 'lib/plugins/context.js')
-rw-r--r-- | lib/plugins/context.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/plugins/context.js b/lib/plugins/context.js deleted file mode 100644 index 17cefb6..0000000 --- a/lib/plugins/context.js +++ /dev/null @@ -1,27 +0,0 @@ -var error = require('../utils/error'); - -/* - Return the context for a plugin. - It tries to keep compatibilities with GitBook v2 -*/ - -function pluginCtx(plugin) { - var book = plugin.book; - var ctx = { - config: book.config, - log: plugin.log, - - // Paths - resolve: book.resolve - }; - - // Deprecation - error.deprecateField(ctx, 'options', book.config.dump(), '"options" property is deprecated, use config.get(key) instead'); - - // Loop for template filters/blocks - error.deprecateField(ctx, 'book', ctx, '"book" property is deprecated, use "this" directly instead'); - - return ctx; -} - -module.exports = pluginCtx; |