Skip to content

Commit

Permalink
Updated README.md to include UMD blurb
Browse files Browse the repository at this point in the history
  • Loading branch information
clocklear committed Mar 19, 2015
1 parent f6ef959 commit f05d703
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,32 @@ 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
acho.info('hello world');
// => 'hello world'
```
All public methods are chaineables:
All public methods are chainable:
```js
acho
Expand Down

0 comments on commit f05d703

Please sign in to comment.