code: func serveDepsJS(rw http.ResponseWriter, req *http.Request, dir string) {
  	var root http.FileSystem
  	if dir == "" {
  		root = uistatic.Files
  	} else {
  		root = http.Dir(dir)
  	}
  
  	b, err := closure.GenDeps(root)
  	if err != nil {
  		log.Print(err)
  		http.Error(rw, "Server error", 500)
  		return
  	}
  	rw.Header().Set("Content-Type", "text/javascript; charset=utf-8")
  	rw.Write([]byte("// auto-generated from perkeepd\n"))
  	rw.Write(b)
  }
docs: // serveDepsJS serves an auto-generated Closure deps.js file.