badges =
Define
badges =
Get Travis Badge
getTravisBadge: (opts={}) ->
Check
return '' if !opts.username or !opts.name
Return
return """
[](http://travis-ci.org/#{opts.username}/#{opts.name} "Check this project's build status on TravisCI")
"""
Get NPM Badge
getNpmBadge: (opts={}) ->
Check
return '' if !opts.name
Return
return """
[](https://npmjs.org/package/#{opts.name} "View this project on NPM")
"""
Get Flattr Badge
getFlattrBadge: (opts={}) ->
Check
return '' if !opts.flattr
Return
return """
[](#{opts.flattr} "Donate monthly to this project using Flattr")
"""
Get Paypal Badge
getPaypalBadge: (opts={}) ->
Check
return '' if !opts.paypal
Return
return """
[](#{opts.paypal} "Donate once-off to this project using Paypal")
"""
Get Badges Section
getBadgesSection: (opts={}) ->
Prepare
result = ''
Concatenate badges
for fn in @getFunctionsEndingWith.call(badges, 'Badge')
result += fn.call(@, opts)+'\n'
Return
return result
Export
module.exports = badges