 
         # return the contents of `filename` w/ the css url(...) paths
         # re-written appropriately
-        cssWithPathsReWritten = (filename) ->
-          updateCssPaths read(join(argv.staticpath, filename)), (url) ->
-            if url[0] isnt "/"
-              join(argv.baseurl, dirname(filename), url)
-            else
-              url
+        cssWithPathsReWritten = (fname) ->
+          updateCssPaths read(fname), (u) ->
+            if u[0] isnt "/" then join(argv.baseurl, dirname(fname), u) else u
+
+        # go through all the components build configs and create a 'paths'
+        # config for the require.js optimizer that includes empty modules for
+        # all excluded files
+        pathsConfig = () ->
+          allComponents().reduce (paths, component) ->
+            if component.build?.exclude
+              paths[module] = "empty:" for module in component.build.exclude
+            paths
+          , extend(true, {strings: "empty:"}, config.paths)
+
 
         output = (text, opts) ->
           text = minify(text) if opts.minify


        # returns the on-disk filename for a css dep like 'css!100:foo.css'
        cssFilename = (moduleName) ->
          filename = moduleName.replace /^css!(\d+:)?/, ''
          if filename[-4..] isnt ".css" then filename + ".css" else filename

        # returns the order for a css dep like 'css!100:foo.css'
        cssOrder = (moduleName) ->

      log "installing #{name} to #{tgtDir}"
      wrench.copyDirSyncRecursive src, join(tgtDir, name)

appBuildProfile = (filename = "app.build.js", dir = ".") ->
  eval read(join(dir, filename))

allNodeModules = () ->
  modules = {}
  t.bfs directories = {path: "."}, (n) ->
    if exists join(n.path, "package.json")
      n.json = pkgJson n.path
    if exists join(n.path, "requirejs-config.json")
      n.config = requirejsConfig null, n.path
    if exists join(n.path, "app.build.js")
      n.build = appBuildProfile null, n.path
    modulesDir = join n.path, "node_modules"
    if exists modulesDir
      n.children = _(fs.readdirSync(modulesDir)).map((d) ->
