all-contributors/cli

avatarBlock is not defined

Opened this issue · 2 comments

From the docs:

"contributorTemplate": "<%= avatarBlock %><br /><%= contributions %>"` 
> ferdi@5.4.1-beta.3 contributors /Users/kytwb/Projects/Ferdi/ferdi
> all-contributors


The JSON data was fixed!
? What do you want to do? Re-generate the contributors list
avatarBlock is not defined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ferdi@5.4.1-beta.3 contributors: `all-contributors`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ferdi@5.4.1-beta.3 contributors script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kytwb/.npm/_logs/2019-12-19T14_55_03_616Z-debug.log

I have used the following instead (after looking at the tests):

"contributorTemplate": "<img src='<%= contributor.avatar_url %>' alt='<%= contributor.avatar_url %>'/>",

You are correct, looking at the code: https://github.com/all-contributors/all-contributors-cli/blob/3382821641ddfaa13135156d2d6d3f5008169153/src/generate/format-contributor.js

It will not work as documented.

@kytwb would you like to put up a PR to fix it?

Will do! 👍