Closed dylang closed 10 years ago
I just noticed in https://github.com/assemble/grunt-readme/blob/master/EXAMPLES.md some of these as examples. Maybe some of those examples could be in the readme?
Great ideas, I'll get the first two bullets added quickly. The github
one sounds great too, but let me get some clarification first.
Do you want the github
mixin (function) to actually pull the file/info from github? I think that's doable for sure (@JeffHerb would you be interested in helping to create a mixin for this? (here are most of the custom mixins I've added so far https://github.com/assemble/grunt-readme/blob/master/tasks/readme.js#L159-L209), I'd be happy to help with that as well).
As a first step, I think a basic mixin that just has one parameter to specify a filename would be great:
{%= _.github("filename.png") %}
The mixin would just extract user/repo name from the package.json, but we can easily add second/third parameters to override as well.
thoughts?
@dylang
Maybe some of those examples could be in the readme?
Sure, I just realized I didn't even mention the examples file in the readme, so I'll at least get that added.
{%= _.github("filename.png") %}
Awesome.
The mixin would just extract user/repo name from the package.json, but we can easily add second/third parameters to override as well.
I think getting it from the package.json
is good enough.
:+1: also see: https://github.com/assemble/grunt-readme/pull/12
This was implemented a while ago (in fact I think these mixins were already there when the request was made, but I misread the request as having to do with getting assets from github)
It would be helpful if a handful of frequently needed variables or functions were provided by default.
For example:
package
which would be data frompackage.json
license
for common open source licenses.license.MIT
,license.GNU
,license.FreeBSD
, etc. It would automatically insert author name frompackage
and the year if needed.github
for github-specific variables likegithub.imageUrl('filename.png')
for including screenshots in the readme,github.projectUrl
, etc.