Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Mar 19, 2015
1 parent 4cfdb40 commit 8c52aec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Very easy to use, customize and extend.
* Expressive API with chaineable methods.
* Mininum dependencies, just focussing on one thing.
* Compatible with AMD/CommonJS or just global object in the browser.

## Install

Expand All @@ -40,23 +41,28 @@ and later add it to your HTML:

### First steps

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 (or Node), 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`.
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.

To use Acho, just create a new logger instance:
If you're using a module loader (or Node), 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`.

#### 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.
I don't use personally use AMD, so I can't conjure an example, but it should work fine as well.
It's time to use it!
Expand Down
10 changes: 4 additions & 6 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# -- Dependencies --------------------------------------------------------------

gulp = require 'gulp'
titleize = require 'titleize'
coffeeify = require 'coffeeify'
gutil = require 'gulp-util'
browserify = require 'browserify'
Expand All @@ -11,7 +12,6 @@ uglify = require 'gulp-uglify'
buffer = require 'vinyl-buffer'
pkg = require './package.json'
source = require 'vinyl-source-stream'
titleize = require 'titleize'

# -- Files ---------------------------------------------------------------------

Expand All @@ -20,7 +20,7 @@ src =

module =
filename : "#{pkg.name}.js"
shortcut : "#{pkg.name}"
shortcut : titleize pkg.name
dist : 'dist'

banner = [
Expand All @@ -31,16 +31,14 @@ banner = [
" * @license <%= pkg.license %>"
" */"].join("\n")

properName = titleize(module.shortcut)

# -- Tasks ---------------------------------------------------------------------

gulp.task 'browserify', ->
browserify
extensions: ['.coffee', '.js']
standalone: properName
standalone: module.shortcut
.transform coffeeify
.require(src.main, { expose: properName })
.require(src.main, { expose: module.shortcut })
.ignore('coffee-script')
.bundle()
.pipe source module.filename
Expand Down

0 comments on commit 8c52aec

Please sign in to comment.