From 81d5b4bbd2f3a11ceb8dec60652e4a92d187a81d Mon Sep 17 00:00:00 2001 From: Alexey Simonenko Date: Wed, 17 Aug 2011 17:28:03 +0400 Subject: [PATCH] Update how module will be export --- README.md | 4 ++-- examples/plain-auth.coffee | 2 +- examples/public-access.coffee | 2 +- examples/token-auth.coffee | 2 +- src/gisty.coffee | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 15f780f..2d24e19 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ How to use with JavaScript -------------------------- ```javascript -var Gisty = require('gisty').Gisty; +var Gisty = require('gisty'); var gist = new Gisty({username: meritt}); @@ -26,7 +26,7 @@ Or with CoffeeScript -------------------- ```coffeescript -Gisty = require('gisty').Gisty +Gisty = require 'gisty' gist = new Gisty username: 'meritt' diff --git a/examples/plain-auth.coffee b/examples/plain-auth.coffee index 8e217fb..eb0d173 100644 --- a/examples/plain-auth.coffee +++ b/examples/plain-auth.coffee @@ -2,7 +2,7 @@ Retrieve starred gist with plain authenticate ### -Gisty = require('./../lib/gisty').Gisty +Gisty = require('./../lib/gisty') gist = new Gisty login: 'login', password: 'password' diff --git a/examples/public-access.coffee b/examples/public-access.coffee index 302f642..857accd 100644 --- a/examples/public-access.coffee +++ b/examples/public-access.coffee @@ -2,7 +2,7 @@ Retrieve public gist ### -Gisty = require('./../lib/gisty').Gisty +Gisty = require('./../lib/gisty') gist = new Gisty username: 'meritt' diff --git a/examples/token-auth.coffee b/examples/token-auth.coffee index 6015dae..4938a8f 100644 --- a/examples/token-auth.coffee +++ b/examples/token-auth.coffee @@ -2,7 +2,7 @@ Retrieve all users gist with OAuth2 access_token ### -Gisty = require('./../lib/gisty').Gisty +Gisty = require('./../lib/gisty') gist = new Gisty token: 'OAuth2 access_token', username: 'meritt' diff --git a/src/gisty.coffee b/src/gisty.coffee index 06c42b6..e42c0f5 100644 --- a/src/gisty.coffee +++ b/src/gisty.coffee @@ -56,4 +56,4 @@ class Gisty fn.call self, error, body -exports.Gisty = Gisty \ No newline at end of file +module.exports = Gisty \ No newline at end of file