     , []
 
 class BrunchWatcher
-  constructor: (@persistent, @options, @onCompile) ->
+  constructor: (@persistent, @options, @_onCompile) ->
     params = {}
     params.minify = yes if options.minify
+    params.persistent = persistent
     if persistent
       params.server = {}
       params.server.run = yes if options.server

        logger.info "compiled."
        logger.debug "compilation time: #{Date.now() - @start}ms"
        @watcher.close() unless @persistent
        @onCompile null, result

  watch: ->
    @initServer()

        .on('unlink', @removeFromFileList)
        .on('error', logger.error)

  onCompile: (result) =>
    @_onCompile result
    @plugins
      .filter (plugin) ->
        typeof plugin.onCompile is 'function'
      .forEach (plugin) ->
        plugin.onCompile result

  compile: =>
    paths = @config.paths
    fs_utils.write @fileList, @config, @plugins, (error, result) =>
