     callback error, plugins
 #------------------------------------------------------------------------------
 
+clone = (obj) ->
+  return obj  if null is obj or "object" isnt typeof obj
+  copy = obj.constructor()
+  for attr of obj
+    copy[attr] = obj[attr]  if obj.hasOwnProperty(attr)
+  copy
+
+
 module.exports = class StaticJadeCompiler
   brunchPlugin: yes
   type: 'template'

    return newpath

  fromJade2Html: (jadeFilePath, callback) ->
    try
      fs.readFile jadeFilePath, (err,data) =>
        if err
          throw err

        @options.filename = jadeFilePath
        fn = jade.compile data,
          @options


    @locals       = @config.plugins?.jade?.locals or () ->
    @extension    = @config.plugins?.static_jade?.extension ? ".jade"
    @relAssetPath = @config.plugins?.static_jade?.asset ? "app/assets"
    options      = @config.plugins?.jade?.options \
                      or @config.plugins?.jade \
                      or {}

    @options = clone options

    mkdirp.sync @relAssetPath

