Permalink
Browse files

Merged in c545e31 with dev-updates

  • Loading branch information...
1 parent 2f12c2b commit 23e93d1b70769467b1a75e7fb39dc3426de31753 @Delapouite Delapouite committed with balupton Aug 19, 2013
Showing with 6 additions and 41 deletions.
  1. +6 −38 src/lib/docpad.coffee
  2. +0 −1 src/lib/testers.coffee
  3. +0 −1 src/test/actions-test.coffee
  4. +0 −1 src/test/api-test.coffee
View
@@ -110,26 +110,6 @@ class DocPad extends EventEmitterGrouped
BasePlugin: BasePlugin
- # ---------------------------------
- # Instances
-
- # Growl
- growlInstance: null
- getGrowlInstance: ->
- # Create
- if @growlInstance? is false
- if @getConfig().growl
- try
- @growlInstance = require('growl')
- catch err
- @growlInstance = false
- else
- @growlInstance = false
-
- # Return
- return @growlInstance
-
-
# ---------------------------------
# DocPad
@@ -227,6 +207,7 @@ class DocPad extends EventEmitterGrouped
'serverBefore'
'serverExtend'
'serverAfter'
+ 'notify'
]
getEvents: ->
@events
@@ -907,14 +888,6 @@ class DocPad extends EventEmitterGrouped
# Which level of logging should we actually output
logLevel: (if ('-d' in process.argv) then 7 else 6)
- # Logger
- # A caterpillar instance if we already have one
- logger: null
-
- # Growl
- # Whether or not to send notifications to growl when we have them
- growl: true
-
# Catch uncaught exceptions
catchExceptions: true
@@ -2172,19 +2145,14 @@ class DocPad extends EventEmitterGrouped
# Chain
@
- # Perform a growl notification
- notify: (message,opts) =>
+ # Send a notify event to plugins (like growl)
+ notify: (message,options={}) =>
# Prepare
docpad = @
- # Check
- growl = @getGrowlInstance()
- if growl
- # Apply
- try
- growl(message, opts)
- catch err
- # ignore
+ # Emit
+ docpad.emitSerial 'notify', {message,options}, (err) ->
+ docpad.error(err) if err
# Chain
@
View
@@ -34,7 +34,6 @@ class PluginTester
docpadConfig:
global: true
port: null
- growl: false
logLevel: (if ('-d' in process.argv) then 7 else 5)
rootPath: null
outPath: null
@@ -26,7 +26,6 @@ testWait = 1000*60*5 # five minutes
# Configure DocPad
docpadConfig =
- growl: false
port: port
rootPath: rootPath
logLevel: if (process.env.TRAVIS_NODE_VERSION? or '-d' in process.argv) then 7 else 5
View
@@ -15,7 +15,6 @@ cliPath = pathUtil.join(docpadPath, 'bin', 'docpad')
# Configure DocPad
docpadConfig =
- growl: false
port: 9780
rootPath: rootPath
logLevel: if (process.env.TRAVIS_NODE_VERSION? or '-d' in process.argv) then 7 else 5

0 comments on commit 23e93d1

Please sign in to comment.