Skip to content

Commit

Permalink
renamed emitSync calls to their new emitSerial name
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Jun 25, 2013
1 parent 6582bb9 commit 17b4e7d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
48 changes: 24 additions & 24 deletions src/lib/docpad.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ class DocPad extends EventEmitterEnhanced
return complete() unless config.welcome

# Welcome
@emitSync('welcome', {docpad}, complete)
@emitSerial('welcome', {docpad}, complete)

# Anyomous
# Ignore errors
Expand Down Expand Up @@ -1233,7 +1233,7 @@ class DocPad extends EventEmitterEnhanced

# DocPad Ready
tasks.addTask (complete) =>
@emitSync('docpadReady', {docpad}, complete)
@emitSerial('docpadReady', {docpad}, complete)

# Run tasks
tasks.run()
Expand Down Expand Up @@ -1353,11 +1353,11 @@ class DocPad extends EventEmitterEnhanced

# Fetch plugins templateData
postTasks.addTask (complete) =>
@emitSync('extendTemplateData', {templateData:@pluginsTemplateData}, complete)
@emitSerial('extendTemplateData', {templateData:@pluginsTemplateData}, complete)

# Fire the docpadLoaded event
postTasks.addTask (complete) =>
@emitSync('docpadLoaded', {}, complete)
@emitSerial('docpadLoaded', {}, complete)

# Fire post tasks
postTasks.run()
Expand Down Expand Up @@ -1724,7 +1724,7 @@ class DocPad extends EventEmitterEnhanced
# Custom Collections Group
tasks = new TaskGroup().setConfig(concurrency:0).once 'complete', (err) ->
docpad.error(err) if err
docpad.emitSync('extendCollections',{},next)
docpad.emitSerial('extendCollections',{},next)

# Cycle through Custom Collections
eachr @config.collections or {}, (fn,name) ->
Expand Down Expand Up @@ -1779,7 +1779,7 @@ class DocPad extends EventEmitterEnhanced

# Perform any plugin extensions to what we just cleaned
# and forward
@emitSync('populateCollections',{},next)
@emitSerial('populateCollections',{},next)

# Chain
@
Expand Down Expand Up @@ -2085,7 +2085,7 @@ class DocPad extends EventEmitterEnhanced

# Render
file.on 'render', (args...) ->
docpad.emitSync('render', args...)
docpad.emitSerial('render', args...)

# Return
file
Expand Down Expand Up @@ -2114,11 +2114,11 @@ class DocPad extends EventEmitterEnhanced

# Render
document.on 'render', (args...) ->
docpad.emitSync('render', args...)
docpad.emitSerial('render', args...)

# Render document
document.on 'renderDocument', (args...) ->
docpad.emitSync('renderDocument', args...)
docpad.emitSerial('renderDocument', args...)

# Return
document
Expand Down Expand Up @@ -2567,7 +2567,7 @@ class DocPad extends EventEmitterEnhanced
tasks = new TaskGroup().setConfig(concurrency:0).once 'complete', (err) ->
return next(err) if err
# After
docpad.emitSync 'loadAfter', {collection}, (err) ->
docpad.emitSerial 'loadAfter', {collection}, (err) ->
docpad.log 'debug', util.format(locale.loadedFiles, collection.length)
next()

Expand Down Expand Up @@ -2605,7 +2605,7 @@ class DocPad extends EventEmitterEnhanced
return complete()

# Start contextualizing
docpad.emitSync 'loadBefore', {collection}, (err) ->
docpad.emitSerial 'loadBefore', {collection}, (err) ->
return next(err) if err
tasks.run()

Expand All @@ -2627,7 +2627,7 @@ class DocPad extends EventEmitterEnhanced
tasks = new TaskGroup().setConfig(concurrency:0).once 'complete', (err) ->
return next(err) if err
# After
docpad.emitSync 'contextualizeAfter', {collection}, (err) ->
docpad.emitSerial 'contextualizeAfter', {collection}, (err) ->
return next(err) if err
docpad.log 'debug', util.format(locale.contextualizedFiles, collection.length)
return next()
Expand All @@ -2640,7 +2640,7 @@ class DocPad extends EventEmitterEnhanced
return complete(err)

# Start contextualizing
docpad.emitSync 'contextualizeBefore', {collection,templateData}, (err) ->
docpad.emitSerial 'contextualizeBefore', {collection,templateData}, (err) ->
return next(err) if err
tasks.run()

Expand All @@ -2662,7 +2662,7 @@ class DocPad extends EventEmitterEnhanced
tasks = new TaskGroup().once 'complete', (err) ->
return next(err) if err
# After
docpad.emitSync 'renderAfter', {collection}, (err) ->
docpad.emitSerial 'renderAfter', {collection}, (err) ->
return next(err) if err
docpad.log 'debug', util.format(locale.renderedFiles, collection.length)
return next()
Expand Down Expand Up @@ -2713,7 +2713,7 @@ class DocPad extends EventEmitterEnhanced
renderCollection(subsequentCollection, {renderPass}, complete)

# Fire the queue
docpad.emitSync 'renderBefore', {collection,templateData}, (err) =>
docpad.emitSerial 'renderBefore', {collection,templateData}, (err) =>
return next(err) if err
tasks.run()

Expand All @@ -2735,7 +2735,7 @@ class DocPad extends EventEmitterEnhanced
tasks = new TaskGroup().setConfig(concurrency:0).once 'complete', (err) ->
return next(err) if err
# After
docpad.emitSync 'writeAfter', {collection}, (err) ->
docpad.emitSerial 'writeAfter', {collection}, (err) ->
return next(err) if err
docpad.log 'debug', util.format(locale.wroteFiles, collection.length)
return next()
Expand Down Expand Up @@ -2763,7 +2763,7 @@ class DocPad extends EventEmitterEnhanced
finish(err)

# Start writing
docpad.emitSync 'writeBefore', {collection,templateData}, (err) =>
docpad.emitSerial 'writeBefore', {collection,templateData}, (err) =>
return next(err) if err
tasks.run()

Expand Down Expand Up @@ -2878,7 +2878,7 @@ class DocPad extends EventEmitterEnhanced

# Fire plugins
tasks.addTask (complete) ->
docpad.emitSync('generateBefore', {reset:opts.reset, server:docpad.getServer()}, complete)
docpad.emitSerial('generateBefore', {reset:opts.reset, server:docpad.getServer()}, complete)

# Run
tasks.run()
Expand All @@ -2898,7 +2898,7 @@ class DocPad extends EventEmitterEnhanced
locale = @getLocale()

# Before
@emitSync 'parseBefore', {}, (err) ->
@emitSerial 'parseBefore', {}, (err) ->
return next(err) if err

# Log
Expand All @@ -2908,7 +2908,7 @@ class DocPad extends EventEmitterEnhanced
tasks = new TaskGroup().setConfig(concurrency:0).once 'complete', (err) ->
return next(err) if err
# After
docpad.emitSync 'parseAfter', {}, (err) ->
docpad.emitSerial 'parseAfter', {}, (err) ->
return next(err) if err
docpad.log 'debug', locale.renderParsed
return next(err)
Expand Down Expand Up @@ -2983,7 +2983,7 @@ class DocPad extends EventEmitterEnhanced
docpad.databaseCache = null

# Fire plugins
docpad.emitSync 'generateAfter', server:docpad.getServer(), (err) ->
docpad.emitSerial 'generateAfter', server:docpad.getServer(), (err) ->
return next(err) if err

# Log generated
Expand Down Expand Up @@ -3776,7 +3776,7 @@ class DocPad extends EventEmitterEnhanced
return next(err) if err

# Plugins
docpad.emitSync 'serverAfter', {server:serverExpress,serverExpress,serverHttp,express}, (err) ->
docpad.emitSerial 'serverAfter', {server:serverExpress,serverExpress,serverHttp,express}, (err) ->
return next(err) if err

# Done
Expand Down Expand Up @@ -3807,7 +3807,7 @@ class DocPad extends EventEmitterEnhanced
return next()

# Start
docpad.emitSync 'serverBefore', {}, (err) ->
docpad.emitSerial 'serverBefore', {}, (err) ->
return finish(err) if err

# Server
Expand Down Expand Up @@ -3836,7 +3836,7 @@ class DocPad extends EventEmitterEnhanced

# Emit the serverExtend event
# So plugins can define their routes earlier than the DocPad routes
docpad.emitSync 'serverExtend', {server:serverExpress,serverExpress,serverHttp,express}, (err) ->
docpad.emitSerial 'serverExtend', {server:serverExpress,serverExpress,serverHttp,express}, (err) ->
return next(err) if err

# DocPad Header Middleware
Expand Down
2 changes: 1 addition & 1 deletion src/lib/interfaces/console.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class ConsoleInterface
# Finish Up

# Plugins
docpad.emitSync 'consoleSetup', {consoleInterface,commander}, (err) ->
docpad.emitSerial 'consoleSetup', {consoleInterface,commander}, (err) ->
return consoleInterface.handleError(err) if err
next(null,consoleInterface)

Expand Down

0 comments on commit 17b4e7d

Please sign in to comment.