Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

0.2.1 node 0.6 compatibility

  • Loading branch information...
commit db3da47f8398564e670dba2db1c2f46d368d5e9f 1 parent 74a0d09
Sean Hess seanhess authored
Showing with 8 additions and 4 deletions.
  1. +4 −1 index.coffee
  2. +4 −3 package.json
5 index.coffee
View
@@ -1,11 +1,14 @@
path = require 'path'
fs = require 'fs'
+existsSync = fs.existsSync ? path.existsSync
+
# simple dependency injection. No nesting, just pure simplicity
exports.container = ->
factories = {}
+
## REGISTER / PARSE ################################################
# register it! Parse it for dependencies
@@ -14,7 +17,7 @@ exports.container = ->
factories[name] = toFactory func
load = (file) ->
- exists = fs.existsSync file
+ exists = existsSync file
if exists
stats = fs.statSync file
if stats.isDirectory() then return loaddir file
7 package.json
View
@@ -1,10 +1,11 @@
{
"name": "dependable",
- "version": "0.2.0",
+ "version": "0.2.1",
"main": "index.js",
"author": "Sean Hess",
- "repository": { "url": "git@github.com:idottv/dependable.git" },
- "main" : "index.js",
+ "repository": {
+ "url": "git@github.com:idottv/dependable.git"
+ },
"scripts": {
"test": "node_modules/.bin/mocha -R spec --compilers coffee:coffee-script test.coffee",
"prepublish": "node_modules/.bin/coffee -c index.coffee"
Please sign in to comment.
Something went wrong with that request. Please try again.