Skip to content

Commit

Permalink
lazy load coffee-script; update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario L Gutierrez committed Apr 20, 2013
1 parent 2e34f6c commit d4b4cb4
Show file tree
Hide file tree
Showing 11 changed files with 291 additions and 313 deletions.
2 changes: 1 addition & 1 deletion Bakefile
Expand Up @@ -10,7 +10,7 @@ function test {
#. Compiles sources
function compile {
invoke clean
coffee -c -o . src
coffee -cb -o . src
}


Expand Down
8 changes: 2 additions & 6 deletions index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

149 changes: 74 additions & 75 deletions lib/settings.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
@@ -1,11 +1,11 @@
{ "name": "settings",
"version": "0.1.0",
"version": "0.1.1",
"description": "Simple environment-based application settings",
"author": "Mario Gutierrez <mario@mgutz.com>",
"repository" : "git://github.com/mgutz/node-settings",
"devDependencies": {
"chai": "~1.0.4",
"coffee-script": "~1.3.3",
"mocha": "~1.1.0"
"chai": "~1.5.0",
"coffee-script": "~1.6.2",
"mocha": "~1.9.0"
}
}
10 changes: 3 additions & 7 deletions src/lib/settings.coffee
@@ -1,18 +1,15 @@
#
# Copyright(c) 2010 Mario L Gutierrez <mario@mgutz.com>
# Copyright(c) 2010-2013 Mario L Gutierrez <mario@mgutz.com>
# MIT Licensed
#

assert = require('assert')
Extend = require('../support/extend')

try
coffee = require('coffee-script') # allows use of coffee for configs
catch ex
null
Path = require('path')

loadModule = (pathOrModule) ->
if typeof pathOrModule == 'string'
require('coffee-script') if Path.extname(pathOrModule) == '.coffee'
mod = require(pathOrModule)
else
mod = pathOrModule
Expand Down Expand Up @@ -40,7 +37,6 @@ loadModule = (pathOrModule) ->
# test.connectionString === 'mysql_test';
#
Settings = (pathOrModule, @options = {}) ->

if typeof pathOrModule == 'string'
@path = pathOrModule

Expand Down
46 changes: 21 additions & 25 deletions test/config/environment.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions test/config/override.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions test/config/override2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 7 additions & 11 deletions test/config/overrideRoot.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 7 additions & 11 deletions test/config/overrideRoot2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d4b4cb4

Please sign in to comment.