Skip to content

Commit

Permalink
fix template list
Browse files Browse the repository at this point in the history
  • Loading branch information
jescalan committed Aug 23, 2017
1 parent bd0a963 commit eb96d05
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/template/list.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
const EventEmitter = require('events')

module.exports = function (Spike, args) {
module.exports = function(Spike, args) {
const emitter = new EventEmitter()
const e2 = new EventEmitter()
process.nextTick(() => {
emitter.on('success', res => {
e2.emit('success', 'Your Templates:\n- ' + Object.keys(res).join('\n- '))
})
Spike.template.list(Object.assign(args, { emitter: emitter }))
})
return emitter
return e2
}

0 comments on commit eb96d05

Please sign in to comment.