verbose / grunt-verb

Grunt plugin for Verb, the markdown documentation generator with zero-configuration required.
MIT License
17 stars 5 forks source link

Default .verbrc template pulls in Jon and Brian authors by default :D #6

Open jwtd opened 9 years ago

jwtd commented 9 years ago

The default .verbrc template contains a reference to contrib("authors").

## Author
{%= contrib("authors") %}

This appears to resolve to https://github.com/verbose/verb-contrib-templates/templates/authors.md which in turn loads jon.md and brian.md...

{%= contrib("jon") %} {%= contrib("brian") %} 

As a result, every default README.md file generated contains:

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

**Brian Woodward**

+ [github/doowb](https://github.com/doowb)
+ [twitter/doowb](http://twitter.com/doowb)

For general use, it would make more sense to load authors and contributors from the module's package.json.

alundiak commented 8 years ago

At this time, I can say, that:

"author": {
    "name": "Andrii Lundiak",
    "url": "https://github.com/alundiak"
}

My readme.md file regenarated, but with content:

## Author
[object Object]
{%= include("author") %}

I have error in console, and readme not re-generated.

Running "verb:readme" (verb) task TypeError: Cannot read property 'replace' of null Cannot find "username" on the context. TypeError: Cannot read property 'split' of undefined Warning: username is not defined Use --force to continue.

Here is my config:

verb: {
    readme: {
        files: [
            {src: ['assets/docs/.verb.md'], dest: 'dist/docs/README_by_verb.md'}
        ]
    }
},

So, regarding initial issue description by @jwtd - it's fixed/implemented, and issue can be closed. But regarding include I'am not sure. I guess, it's expected function, and you @jonschlinkert have not implemented such. Right?