Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jwtd opened this issue Jan 4, 2015 · 1 comment
Open

Comments

@jwtd
Copy link

jwtd commented Jan 4, 2015

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
Copy link

At this time, I can say, that:

  • {%= contrib('authors') %} gives the same code as @jwtd described.
  • Code like this: {%= author %} works fine, assuming, that in my package.json exists property author (singular, not authors): "author": "Andrii Lundiak", "license": "ISC",
  • With the same code {%= author %} in .verb.md, but different code in package.json:
"author": {
    "name": "Andrii Lundiak",
    "url": "https://github.com/alundiak"
}

My readme.md file regenarated, but with content:

## Author
[object Object]
  • Nevertheless, if I use include code (suggested by someone time ago):
{%= 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants