Permalink
Browse files

v6.63.2. Improvement.

- v6.63.2 January 30, 2014
	- Don't show generate success message if an error occured
  • Loading branch information...
1 parent b627cd4 commit 6e4c5a531c9d9a1e45b897ed57a87179705ce9d3 @balupton balupton committed Jan 30, 2014
Showing with 12 additions and 10 deletions.
  1. +3 −0 HISTORY.md
  2. +1 −1 package.json
  3. +8 −9 src/lib/docpad.coffee
View
@@ -1,5 +1,8 @@
# History
+- v6.63.2 January 30, 2014
+ - Don't show generate success message if an error occured
+
- v6.63.1 January 30, 2014
- Fixed gobbling of error messages during `contextualizeFiles`, `renderFiles` or `writeFiles` (regression since v6.59.2)
- Thanks to [Rob Loach](https://github.com/RobLoach), [Nathan Rijksen](https://github.com/Naatan) for [issue #784](https://github.com/bevry/docpad/issues/784)
View
@@ -1,7 +1,7 @@
{
"title": "DocPad. Streamlined web development.",
"name": "docpad",
- "version": "6.63.1",
+ "version": "6.63.2",
"description": "DocPad is a next generation web architecture that lets you create fast static websites with dynamic abilities and powerful abstractions. Write your website as files on your computer, entries in a database, or even RSS feeds and DocPad will import it, generate & render it, then output a static website for deployment anywhere or a dynamic node website for advanced server-side functionality. Use it as a module or standalone. It's purely awesome. Check it out.",
"homepage": "http://docpad.org",
"installUrl": "http://docpad.org/install",
View
@@ -3330,11 +3330,12 @@ class DocPad extends EventEmitterGrouped
# Tasks
tasks = new TaskGroup("generate tasks")
- .on 'item.run', (item) ->
+ .on('item.run', (item) ->
totals = tasks.getTotals()
opts.progress?.step("generate: #{item.getConfig().name}").total(totals.total).setTick(totals.completed)
+ )
- .once 'complete', (err) ->
+ .once('complete', (err) ->
# Update generating flag
docpad.generating = false
docpad.generateEnded = new Date()
@@ -3350,24 +3351,22 @@ class DocPad extends EventEmitterGrouped
docpad.destroyProgress(opts.progress)
opts.progress = null
- # Prepare
+ # Error?
+ return next(err) if err
+
+ # Log success message
seconds = (docpad.generateEnded - docpad.generateStarted) / 1000
howMany = "#{opts.collection?.length or 0}/#{database.length}"
-
- # Log
- opts.progress?.finish()
docpad.log 'info', util.format(locale.renderGenerated, howMany, seconds)
docpad.notify (new Date()).toLocaleTimeString(), {title: locale.renderGeneratedNotification}
- # Error?
- return next(err) if err
-
# Generated
if opts.initial is true
docpad.generated = true
return docpad.emitSerial('generated', opts, next)
else
return next()
+ )
# Extract functions from tasks for simplicity
# when dealing with nested tasks/groups

0 comments on commit 6e4c5a5

Please sign in to comment.