 
     callback(sources, project_name, args)
 
+configuration = {}
+check_config = (package)->
+  defaults = {
+    css: (__dirname + '/../resources/docco.css')
+  }
+  unless package.docco_configuration?
+    configuration = defaults
+  else
+    pkg_cfg = package.docco_configuration
+    if pkg_cfg.css? then configuration.css = pkg_cfg.css else configuration.css = defaults.css
+
 parse_args (sources, project_name, raw_paths) ->
   # Rather than relying on globals, let's pass around a context w/ misc info
   # that we require down the line.
   context = sources: sources, project_name: project_name
+  
+  package_path = process.cwd() + '/package.json'
+  package_json = if file_exists(package_path) then JSON.parse(fs.readFileSync(package_path).toString()) else {}
+  check_config(package_json)
 
   ensure_directory 'docs', ->
-    fs.writeFile 'docs/docco.css', docco_styles
+    generate_readme(context, raw_paths,package_json)
+    fs.writeFile 'docs/docco.css', fs.readFileSync(configuration.css).toString()
     files = sources[0..sources.length]
     next_file = -> generate_documentation files.shift(), context, next_file if files.length
     next_file()
-    generate_readme(context, raw_paths)
-
+

        write_func()


generate_readme = (context, sources) ->
  title = "README"
  dest = "docs/readme.html"
  source = "README.md"

  readme_template  = jade.compile fs.readFileSync(__dirname + '/../resources/readme.jade').toString(), { filename: __dirname + '/../resources/readme.jade' }
  readme_path = process.cwd() + '/README.md'
  readme_markdown = if file_exists(readme_path) then fs.readFileSync(readme_path).toString() else "There is no README.md for this project yet :( "

  content = showdown.makeHtml readme_markdown

