 jsShimMap = {}
 if config?
   paths = config.clientSettings.paths
-  for name, value of config.clientSettings.shim
+  shim = config.clientSettings.shim
+  buildConfig = {paths, shim}
+  for name, value of shim
     path = paths[name] ? name
     deps = ((paths[dep] ? dep) for dep in value.deps)
     jsShimMap[path] = {deps}

        when '.html', '.htm', '.css'
          # Run the source file through template engine
          sourceData = _.template(fs.readFileSync(source).toString(), _.extend({}, {settings}, htmlHelpers))
          sourceData = injectLiveReloadJS(sourceData)
          filename = sysPath.basename(source)
          path = sysPath.join destDir, filename
          fs.writeFileSync path, sourceData

  image_tag: (src, attrs={}) ->
    "<img src='#{settings.assetHost}#{src}#{cacheBuster(attrs.forceCacheBuster)}' #{("#{k}='#{v}'" for k, v of attrs).join(' ')}>"
  include_module_loader: ->
    """
    <script>#{moduleLoaderSrc}</script>
    <script>require.config(#{JSON.stringify(buildConfig)})</script>
    <script>#{liveReloadSrc}</script>
    """

# Files to ignore
ignored = (file) ->
