dothiv/banner — pull request #3 by coderbyheart (2014-04-07 06:52:43+00:00)
Title: Enable local testing.

This commit changes the `debug` build to enable testing from the local system.

All banner resources are loaded locally.
The banner configuration is loaded from a local `demo.json` file (added).

This is achieved by added [`grunt-preprocess`](https://github.com/jsoverson/grunt-preprocess)
which enables conditionals in the source file which is needed to replace
remote calls to `dothiv-registry.appspot.com`:

// @ifdef DEBUG
request.open("GET", "demo.json", true);
// @endif
// @ifndef DEBUG
request.open("POST", "https://dothiv-registry.appspot.com/c?from=iframe&domain=" + document.domain, true);
// @endif

Now, when loading `build/test-page.html` all resources are loaded from the current host.