 
 # Bundles up client-side JS, traversing from an initial entry point.
 bundle = (entry, opts, callback) ->
-  find entry, (err, requires) ->
+  findDependencies entry, (err, requires) ->
     callback err, (wrap require, opts for _, require of requires).join('\n\n')
 
 exports.cli = -> require './cli'
 
 exports.createBundler = ({entry, prepend}) ->
-  entry = path.resolve entry
-  console.log entry
   bundler =
     bundle: (opts, callback) ->
       if typeof opts is 'function'

  iterate = (require, parent) ->
    if parent and /^[./]/.test require
      # this is a relative require
      path = join parent.base, require
    else
      # this is an npm module
      path = require

    resolve path, (err, filename) ->
      if parent
        # Add to parent's map of resolved modules
        parent.resolved[require] = filename

compilers = require './compilers'
crypto    = require 'crypto'
fs        = require 'fs'
{resolve} = require './resolve'
{parse}   = require './ast'

{dirname, extname, join} = require 'path'
{fatal, prettyDate, readFiles, uniq} = require './utils'

cache = {}

findDependencies = (entry, callback) ->
  count = 0

  alias = do ->
    base = dirname(entry).length
