From a36ee27e46780047dedd2a8666726191a9b848e0 Mon Sep 17 00:00:00 2001 From: Karsten Gebbert Date: Wed, 16 Apr 2014 15:16:23 +0200 Subject: [PATCH] document browserification (closes #1) --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index b0c227e..278a1e5 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,16 @@ require('docuri').stringify({ // 'mytype/myid/mysubtype/myversion/myindex' ``` +## Browser support +To use docid in your client-side application, browserify it like this: + +```shell +browserify -s DocURI path/to/docuri/index.js > path/to/your/assets + +``` +Once added to your DOM, this will leave you with a global DocURI object for use +in your e.g. Backbone Models/Collections. + ## Development To run the unit tests: ```shell