From 44daf1b67672c213d0c923090b911a2f047f75f9 Mon Sep 17 00:00:00 2001 From: Robert Hall Date: Wed, 11 Jan 2017 07:03:00 -0500 Subject: [PATCH] Debug initializer Maybe this is the wrong place? I couldn't find documentation for `DEBUG`, so I threw it in here. It *is* in the migration docs, but I think it needs to be linked somewhere in the actual docs, not just migration. If you think this needs to go somewhere else, I'd be happy to do a different PR. --- docs/0.8/Options.md.hbs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/0.8/Options.md.hbs b/docs/0.8/Options.md.hbs index e3450b3..6eb722f 100644 --- a/docs/0.8/Options.md.hbs +++ b/docs/0.8/Options.md.hbs @@ -29,6 +29,7 @@ ractive.myMethod(); // triggers the alert | [csp](#csp) | [parsing](#parsing) | output CSP compatible (inline functions for expressions) templates | | [css](#css) | [templating](#templating) | component only css to include on render | | [data](#data) | [data](#data-binding) | the data to bind to the template | +| [debug](#debug) | [configuration](#configuration) | debug information output to the console | | [decorators](#decorators) | [templating](#templating) | decorators to include for use by the template | | [delimiters](#delimiters) | [parsing](#parsing) | delimiters to use when parsing the template | | [easing](#easing) | [transitions](#transitions-animations) | easing functions to use in transitions | @@ -67,6 +68,15 @@ ractive.myMethod(); // triggers the alert +## Configuration + +> +> ### debug *`Boolean`* +> Defaults to `true`. This setting outputs debugging information to the console, applied globally. Set before the first Ractive instance is created. Throwing the following in your code will automagically set debug to `false` for minified files. +> ```js +> Ractive.DEBUG = /unminified/.test(function(){/*unminified*/}); +> ``` + ## Templating >