Skip to content

Commit

Permalink
Require underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Dec 12, 2010
1 parent 68854d1 commit 7f661af
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 36 deletions.
27 changes: 4 additions & 23 deletions lib/stitch/index.js

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@
{ "type": "git"
, "url": "http://github.com/sstephenson/stitch.git"
}
, "dependencies": {
"underscore": ">=1.1.3"
}
}
17 changes: 4 additions & 13 deletions src/stitch/index.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
fs = require 'fs'
_ = require 'underscore'
fs = require 'fs'
sys = require 'sys'

{extname, join, normalize} = require 'path'

defaultCompilers =
Expand All @@ -14,17 +16,6 @@ try
module._compile content, filename
catch err

extend = (destination, source) ->
for key, value of source
destination[key] = value
destination

merge = (objects...) ->
result = {}
for object in objects
extend result, object if object
result

forEachAsync = (elements, callback) ->
remainingCount = elements.length

Expand Down Expand Up @@ -76,7 +67,7 @@ exports.getFilesInTree = getFilesInTree = (directory, callback) ->
callback err, files.sort()

getCompilersFrom = (options) ->
merge defaultCompilers, options.compilers
_.extend {}, defaultCompilers, options.compilers

compilerIsAvailableFor = (filename, options) ->
for name in Object.keys getCompilersFrom options
Expand Down

0 comments on commit 7f661af

Please sign in to comment.