From f05d703b5f2a6d999bb886f6b870ed992fbdec7d Mon Sep 17 00:00:00 2001 From: Cory Locklear Date: Wed, 18 Mar 2015 20:47:29 -0400 Subject: [PATCH] Updated README.md to include UMD blurb --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1319809..d1667b7 100755 --- a/README.md +++ b/README.md @@ -41,13 +41,24 @@ and later add it to your HTML: ### First steps -To use it, you just create a new logger instance. +Acho exports itself according to UMD best practices, which means that no matter where you are using the library, you get a version tailored for your environment. If you're using a module loader, simple require the library as you would any other module. If you're using a browser, the library falls back to attaching itself to window as the global `Acho`. +To use Acho, just create a new logger instance: + +#### CommonJS ```js var Acho = require('acho'); var acho = new Acho({color: true}); ``` +#### Global/Browser +```js +var acho = new Acho({color: true)); +``` + +#### AMD +I don't use personally use AMD, ere go I can't conjure an example, but it should work fine as well. + It's time to use it! ```js @@ -55,7 +66,7 @@ acho.info('hello world'); // => 'hello world' ``` -All public methods are chaineables: +All public methods are chainable: ```js acho