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

No TOC generated #91

Closed
phun-ky opened this issue Mar 17, 2016 · 45 comments
Closed

No TOC generated #91

phun-ky opened this issue Mar 17, 2016 · 45 comments

Comments

@phun-ky
Copy link

phun-ky commented Mar 17, 2016

I've installed both verb and verb-cli, executed it like this:

verb

Ok, it went through my .verb.md file and polished it.

And, as the documentation clearly states:

Generate a Table of Contents simply by adding <!-- toc --> to any document.

And naively I believed the phrasing you have:

... with zero configuration required

So I will try to explain what I am doing, and what I expect:
Added <!-- toc --> to the .verb.md file, no TOC generated
Executed verb --toc, no TOC generated
Executed verb with "verb" : { "toc": true} in package.json, no TOC generated
Executed verb with "verb --toc" : { "toc": true} in package.json, no TOC generated
Added a verbfile.js with this:

'use strict';

var verb = require('verb');
var gutil = require('gulp-util');

verb.task('docs', function() {
  verb.extendWith(require('verb-toc'));
  verb.src(['.verb*.md'])
    .on('error', gutil.log)
    .pipe(verb.dest('./'));
});

verb.task('default', ['docs']);

Resulting in: [TypeError: verb.extendWith is not a function]

Added a verbfile.js with this:

'use strict';

var gutil = require('gulp-util');

module.exports = function (verb) {
  verb.extendWith(require('verb-toc'));
  verb.task('default', function() {
    verb.src(['.verb*.md'])
      .on('error', gutil.log)
      .pipe(verb.dest('./'));
  });
  return verb;
};

Resulting in: [Error: Invalid taskdefault. Registerdefaultbefore calling run.]

So what is the diddly-o here?

Versions:
alexander@alexander-w541-laptop  ~/Workspace/proj   f-verb ●  npm -v && node -v && verb -v
3.3.12
v5.1.0

[11:01:46] CLI version 0.7.4
[11:01:46] Local version 0.8.10
[11:01:46] using verbfile ~/Workspace/proj/verbfile.js
@jonschlinkert
Copy link
Member

please see the dev branch, and #78. 200+ commits ahead of master. sorry for the issues, I'm working to get them fixed with the refactor

@tunnckoCore
Copy link

@phun-ky in short

npm cache clean && npm i -g verbose/verb#dev verb-readme-generator

@jonschlinkert , maybe should add quick notice in master branch. :)

Cheers,
Charlike!

@jonschlinkert
Copy link
Member

maybe should add quick notice in master branch. :)

yeah that's good advice. I'll do that thx

@phun-ky
Copy link
Author

phun-ky commented Mar 23, 2016

@tunnckoCore in short, no, still not producing any toc with the same approach

@tunnckoCore
Copy link

Are you sure you are using the dev branch? I'm with latest dev commit (okey, not so latest - 4 commits behind it) and it works. Please check _resolved field on installed package.json - globally installed verb's package.json.

I'm with that and works as expected.

"_resolved": "git://github.com/verbose/verb.git#894f6f604ba2

@jonschlinkert
Copy link
Member

try adding this to package.json:

{
  "verb": {
    "toc": true
  }
}

@phun-ky
Copy link
Author

phun-ky commented Mar 23, 2016

@jonschlinkert tried that, not helping.

but I see now that my global installed verb is:

"_resolved": "https://registry.npmjs.org/verb/-/verb-0.8.10.tgz",
"_shasum": "52a0803b883eea489a59288cf9452645b2676532",

Will try to force the reinstall of verb

@phun-ky
Copy link
Author

phun-ky commented Mar 23, 2016

Nope:

$ ~/Workspace/project   f-readme ●  verb --toc
GeneratorError: generator [default] reason: task "readme" is not registered
    at getTaskFn (/usr/local/lib/node_modules/verb/node_modules/composer/lib/resolve.js:50:11)
    at Verb.module.exports (/usr/local/lib/node_modules/verb/node_modules/composer/lib/resolve.js:35:13)
    at /usr/local/lib/node_modules/verb/node_modules/composer/lib/flow.js:20:23
    at Verb.Composer.build (/usr/local/lib/node_modules/verb/node_modules/composer/index.js:154:10)
    at Verb.<anonymous> (/usr/local/lib/node_modules/verb/node_modules/base-generators/index.js:540:13)
    at /usr/local/lib/node_modules/verb/node_modules/async/lib/async.js:52:16
    at /usr/local/lib/node_modules/verb/node_modules/async/lib/async.js:269:32
    at /usr/local/lib/node_modules/verb/node_modules/async/lib/async.js:44:16
    at Verb.<anonymous> (/usr/local/lib/node_modules/verb/node_modules/base-runner/lib/config/tasks.js:6:5)
    at MapConfig.<anonymous> (/usr/local/lib/node_modules/verb/node_modules/map-config/index.js:171:17)
ENV: undefined

 ✘ $ ~/Workspace/project   f-readme ●  verb readme               
[TypeError: base-runner#runner utils.union is not a function]
 ✘ $ ~/Workspace/project   f-readme ●  verb --config toc:true                        
[18:19:16] updated package.json config with: { toc: true }
[18:19:16] finished ✔
 $ ~/Workspace/project   f-readme ●  verb --config toc:true
[18:20:31] updated package.json config with: { toc: true }
[18:20:31] finished ✔
 $ ~/Workspace/project   f-readme ●  verb --config toc:true
[18:20:53] updated package.json config with: { toc: true }
[18:20:53] finished ✔

None of this works..

@tunnckoCore
Copy link

GeneratorError: generator [default] reason: task "readme" is not registered

Seems like you didn't install verb-readme-generator globally.

@jonschlinkert
Copy link
Member

https://registry.npmjs.org/verb/-/verb-0.8.10.tgz"

that is the old version of verb though. dev is 0.9.0.

To install dev you need to do npm install -g verbose/verb#dev. Make sure you first delete verb and verb-cli from both global node_modules and remove the verb binary from global bin.

@phun-ky
Copy link
Author

phun-ky commented Mar 23, 2016

@tunnckoCore tried this several times, it will not install globally:

$ sudo npm install verb-readme-generator -g --verbose

But I noticed that I have two global node_modules :S

/usr/lib/node_modules and /usr/local/lib/node_modules

The latter got verb-readme-generator installed

@tunnckoCore
Copy link

But I noticed that I have two global node_modules :S

What system you are using?
There's a problem with loading global modules from different prefix. There are few issues opened jonschlinkert/global-prefix#2, jonschlinkert/global-prefix#3 and dylang/npm-check#85.

I'm on ArchLinux and I was using nodejs and npm directly installed, not nvm or other version manager, so I needed to change the npm prefix to /usr/local to have right permissions and right access to globally installed modules, then I had issues with using globally installed verb-readme-generator (verb fails to load it, cuz it not finding it).

The latter got verb-readme-generator installed

Yea, the whole problem, in short, is that verb tries to load from /usr/lib and it fails to load from other manually defined path - in your and my case - /usr/local/lib.

So currently the fix is to use some version manager - nvm is awesome. Or build nodejs manually and set the custom prefix.

I didn't use nvm, because I wanted "always up-to-date" as I'm on ArchLinux and have autoupdate and autocheck for new versions of installed software in every hour. But nodejs package on AUR is delayed in anyway, so I considered to move again to nvm - I'm forced to manually upgrade my nodejs version every time there is new release, because I want always latest.

@phun-ky
Copy link
Author

phun-ky commented Mar 23, 2016

Using:

Ubuntu 15.04 64-bit
$ npm -v && node -v
3.3.12
v5.1.0

Using n as nodejs version manager

@jonschlinkert
Copy link
Member

@phun-ky thanks so much for working through this. that's awesome of you. as soon as we can @doowb and I will review your code in more detail to see if we can figure out what's happening.

early feedback like this is so helpful for creating an awesome project and ecosystem. verb is pretty awesome, and hopefully you'll get a chance to see that. thanks

@tunnckoCore
Copy link

we can figure out what's happening.

I'm helping :)

@phun-ky Using n as nodejs version manager

Yep, that's the problem, it uses /usr/local as default prefix. But then, it's strange why there is also /usr/lib - are you installed nodejs/npm with apt-get?
I don't know why exactly I'm asking, when I'm sure that you:

  • installed nodejs through apt-get
    • which in turn: 1) installs npm and 2) set prefix to be /usr by default
    • so 3) npm installs global modules in node_modules in /usr/lib
  • then you installed n with existing and already installed npm (npm i -g n)
  • so everything (installed with npm after that), is installed in ns default - /usr/local
    • so every new module is in /usr/local/lib/node_modules not in /usr/lib/node_modules

And one more question: how you installed n? If above scenario seems like yours, then remove everything and install n with curl and bash, e.g. as shown in its readme:

curl -L http://git.io/n-install | bash

not through npm, then install wanted nodejs version.

@jonschlinkert
Copy link
Member

I'm helping :)

you are indeed! thank you!

@phun-ky
Copy link
Author

phun-ky commented Mar 24, 2016

@tunnckoCore removed every trace of node, installed n via curl,

which node
/home/alexander/n/bin/node
which npm
/home/alexander/n/bin/npm

Shouldn't these point to some /usr/* path?

Tried to install with this prefix aswell:

PREFIX=/usr/local sudo make install
sudo PREFIX=/usr/local make install

But I get this:

sudo npm cache clean && sudo npm i -g verbose/verb#dev verb-readme-generator
[sudo] password for alexander: 
sudo: npm: command not found

I am out of clues now :S

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

Update:

I now have:

  • correct branch of verb installed globally
  • verb-readme-generator installed globally
  • verb-toc installed globally

My verb config looks like this:

"verb": {
  "toc": true,
  "layout": "default"
}

My verbfile.js (derpfile, docs does not say this is required to a) produce a readme, b)create a toc), but I have come furthest with this:

module.exports = function(app) {
  app.extendWith('verb-readme-generator');

  // call the `readme` task from verb-readme-generator
  app.task('default', ['readme']);
};

My .verb.md looks like this (stuff ommitted)

> {%= description %}

<!-- toc -->

## Nomenclature

* LOB - Line of business

## Security

And the produced README.md looks like this:

> Frontend for <ommited>

<!-- toc -->

## Nomenclature

* LOB - Line of business

## Security

This is how I run it (and I get an error)

verb readme --toc
[10:56:18] using verbfile ~/Workspace/IF/MyBusiness/verbfile.js
[10:56:18] starting default generator
[10:56:18] starting default:readme task
[10:56:18] starting default generator
[10:56:18] finished default generator 46ms
TypeError: markdown-link expects href to be a string.
    at Function.link (/home/alexander/n/lib/node_modules/verb-readme-generator/node_modules/markdown-link/index.js:23:11)
    at Context.copyright (/home/alexander/n/lib/node_modules/verb-readme-generator/node_modules/helper-copyright/index.js:46:27)
    at Function.<anonymous> (/home/alexander/n/lib/node_modules/verb/node_modules/deep-bind/index.js:61:15)
    at Function.<anonymous> (/home/alexander/n/lib/node_modules/verb/node_modules/async-helpers/index.js:278:23)
    at /home/alexander/n/lib/node_modules/verb/node_modules/co/index.js:136:8
    at Function.thunkToPromise (/home/alexander/n/lib/node_modules/verb/node_modules/co/index.js:135:10)
    at Function.toPromise (/home/alexander/n/lib/node_modules/verb/node_modules/co/index.js:119:55)
    at next (/home/alexander/n/lib/node_modules/verb/node_modules/co/index.js:99:29)
    at onFulfilled (/home/alexander/n/lib/node_modules/verb/node_modules/co/index.js:69:7)
ENV: <Generator default [string] /home/alexander/Workspace/IF/MyBusiness/verbfile.js>

REASON: "copyright" helper cannot resolve: `{"linkify":true}`

@tunnckoCore
Copy link

Seriously, I don't know, it's strange. The only I can say is "too much done" and I think this error is different thing.

Verbfile not needed, verb-toc globally not needed (it is included in verb-readme-generator), flag when running is not need, because in config is true.

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

Removed verb-toc globally, removed verbfile.js :

verb readme
GeneratorError: generator [default] reason: task "readme" is not registered
    at getTaskFn (/home/alexander/n/lib/node_modules/verb/node_modules/composer/lib/resolve.js:50:11)
    at Verb.module.exports (/home/alexander/n/lib/node_modules/verb/node_modules/composer/lib/resolve.js:35:13)
    at /home/alexander/n/lib/node_modules/verb/node_modules/composer/lib/flow.js:20:23
    at Verb.Composer.build (/home/alexander/n/lib/node_modules/verb/node_modules/composer/index.js:154:10)
    at Verb.<anonymous> (/home/alexander/n/lib/node_modules/verb/node_modules/base-generators/index.js:540:13)
    at /home/alexander/n/lib/node_modules/verb/node_modules/async/lib/async.js:52:16
    at /home/alexander/n/lib/node_modules/verb/node_modules/async/lib/async.js:269:32
    at /home/alexander/n/lib/node_modules/verb/node_modules/async/lib/async.js:44:16
    at Verb.<anonymous> (/home/alexander/n/lib/node_modules/verb/node_modules/base-runner/lib/config/tasks.js:6:5)
    at MapConfig.<anonymous> (/home/alexander/n/lib/node_modules/verb/node_modules/map-config/index.js:171:17)
ENV: undefined

@jonschlinkert
Copy link
Member

That error indicates that verb-readme-generator is not installed globally.

Maybe we can step back for a moment and start from the beginning.

The following is all that should be needed (before you run this, for debugging purposes if there is still a verbfile.js, please remove or temporarily rename it so we're starting from a clean slate):

$ npm i -g verbose/verb#dev verb-readme-generator && verb readme

There should not be any additional effort or derpfiles required. If that doesn't work, there's a bug. I'd like to just focused on getting that specific thing fixed.

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

Same result.

GeneratorError: generator [default] reason: task "readme" is not registered
    at getTaskFn (/home/alexander/n/lib/node_modules/verb/node_modules/composer/lib/resolve.js:50:11)
    at Verb.module.exports (/home/alexander/n/lib/node_modules/verb/node_modules/composer/lib/resolve.js:35:13)
    at /home/alexander/n/lib/node_modules/verb/node_modules/composer/lib/flow.js:20:23
    at Verb.Composer.build (/home/alexander/n/lib/node_modules/verb/node_modules/composer/index.js:154:10)
    at Verb.<anonymous> (/home/alexander/n/lib/node_modules/verb/node_modules/base-generators/index.js:540:13)
    at /home/alexander/n/lib/node_modules/verb/node_modules/async/lib/async.js:52:16
    at /home/alexander/n/lib/node_modules/verb/node_modules/async/lib/async.js:269:32
    at /home/alexander/n/lib/node_modules/verb/node_modules/async/lib/async.js:44:16
    at Verb.<anonymous> (/home/alexander/n/lib/node_modules/verb/node_modules/base-runner/lib/config/tasks.js:6:5)
    at MapConfig.<anonymous> (/home/alexander/n/lib/node_modules/verb/node_modules/map-config/index.js:171:17)
ENV: undefined

And here is the ls from n

✘ alexander@alexander-w541-laptop  ~/n/lib/node_modules   master  ls
babel-eslint  eslint  eslint-plugin-react  npm  verb  verb-readme-generator

alexander@alexander-w541-laptop  ~/n/bin   master  ls
eslint  n  node  npm  verb

@jonschlinkert
Copy link
Member

reason: task "readme" is not registered

Hmm, are you using a custom npm prefix? (I scanned the above comments where @tunnckoCore mentioned this, but didn't see a direct answer to that. Only that you're using n for versioning. sorry if you already answered)

edit: this looks like a bug either way. if you're using a custom prefix I think I know how to resolve it. If not, I have an idea of what it might be.

@tunnckoCore
Copy link

@jonschlinkert it's obvious that he use custom prefix, n is installed in his home, default is /usr/local.
But I don't think this is still a issue, I also use custom prefix (actually not custom, but I'm currently using nvm, so it is installed also in my home).

I created some screencast.

https://asciinema.org/a/5bupqhlt9hzgr105kkhfk41hl

@jonschlinkert
Copy link
Member

it's obvious that he use custom prefix,

I don't think it's obvious. I don't use n, so maybe it's obvious if you use that. but you also just made the point that you can use a versioning system and use the default prefix.

looking at the screencast

edit: nvm I think I misread what you said about home/defaul

@jonschlinkert
Copy link
Member

what did you use to create the screencast?

@tunnckoCore
Copy link

what did you use to create the screencast?

Just the asciinema archlinux package :) they also have packages for other distros, but I don't know if there's for Mac.

edit: actually, yes https://asciinema.org/docs/installation, it's awesome!

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

@tunnckoCore watching it now, but can you try without the scaffolding? just in case..

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

@tunnckoCore here is my screencast, same result:

https://asciinema.org/a/b0ra391rp42usyuasovopdnxm

@tunnckoCore
Copy link

I'm watching it now.

but can you try without the scaffolding

it doesn't do anything special - just copy files and my .verb.md layout.

@tunnckoCore
Copy link

@phun-ky you miss to add .verb.md (it's required) and package.json config (it's not required, so you should pass --toc or add toc: true to the package.json verb config).

And can you then try with nvm - just install it through curl again without setting anything special (it will be installed in ~/.nvm.

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

@tunnckoCore https://asciinema.org/a/54h7rg221fpttjux2p4efu1bo

.verb.md and package.json-config is also added:

> {%= description %}

## Nomenclature

* LOB - Line of business

## Security

We have included some security measures on our server, including, but not limited to:

* [helmet](https://github.com/helmetjs/helmet) - Helmet helps you secure your Express apps by setting various HTTP headers.

package.json:

{
  "name": "new-project",
  "version": "1.0.0",
  "description": "A description",
  "main": "index.js",
  "dependencies": {},
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "verb": {
    "toc": true,
    "layout": "default",
    "task": [
      "readme"
    ]
  }
}

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

@tunnckoCore the error in the screencast:

 ✘ alexander@alexander-w541-laptop  ~/Workspace/new-project  verb readme 
GeneratorError: generator [default] reason: task "readme" is not registered
    at getTaskFn (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/composer/lib/resolve.js:50:11)
    at Verb.module.exports (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/composer/lib/resolve.js:35:13)
    at /home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/composer/lib/flow.js:20:23
    at Verb.Composer.build (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/composer/index.js:154:10)
    at Verb.<anonymous> (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/base-generators/index.js:540:13)
    at /home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/async/lib/async.js:52:16
    at /home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/async/lib/async.js:269:32
    at /home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/async/lib/async.js:44:16
    at Verb.<anonymous> (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/base-runner/lib/config/tasks.js:6:5)
    at MapConfig.<anonymous> (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/map-config/index.js:171:17)
ENV: undefined

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

@tunnckoCore after realizing that verb-readme-generator has to be installed in devDepenedencies, I manager to get a bit further, but still getting error as previously mentioned further up in this issue:

 ✘ alexander@alexander-w541-laptop  ~/Workspace/new-project  verb readme
[16:27:24] starting readme generator
[16:27:24] starting readme:readme task
[16:27:24] starting readme generator
[16:27:24] finished readme generator 52ms
TypeError: markdown-link expects href to be a string.
    at Function.link (/home/alexander/Workspace/new-project/node_modules/markdown-link/index.js:23:11)
    at Context.copyright (/home/alexander/Workspace/new-project/node_modules/helper-copyright/index.js:46:27)
    at Function.<anonymous> (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/deep-bind/index.js:61:15)
    at Function.<anonymous> (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/async-helpers/index.js:278:23)
    at /home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/co/index.js:136:8
    at Function.thunkToPromise (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/co/index.js:135:10)
    at Function.toPromise (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/co/index.js:119:55)
    at next (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/co/index.js:99:29)
    at onFulfilled (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/co/index.js:69:7)
ENV: undefined

REASON: "copyright" helper cannot resolve: `{"linkify":true}`

@jonschlinkert still no README.md generated

@tunnckoCore
Copy link

after realizing that verb-readme-generator has to be installed in devDepenedencies

Absolutely no, that's the coolness of 0.9.0, no more need to install and have verb or other things in devDeps (by default, if you need you can pass helpers/asyncHelpers/plugins).

the error in the screencast:

The cool thing of asciinema is that you can directly copy paste from the cast :)

@jonschlinkert damn, that's strange, lol!! 😆 isn't it? 🚀 I give up. lol

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

SIGH

Made it work.. But to get this to work, these criteria has to be met:

  • Install verb#dev globally
  • Install verb-readme-generator locally (pref with --save-dev
  • Have a .verb.md file
  • Have a package.json-config which HAS TO contain these attributes with correct values: author:name, author:url, repository, and verb:tasks:["readme"],verb:layout`

I think some of the attributes has to be set to use the default layout, but you have to set a layout it seems to produce the TOC..

@tunnckoCore
Copy link

Install verb-readme-generator locally (pref with --save-dev

No. Remove it, and install it globally, but add <!-- toc --> to your .verb.md

author:name, author:url, repository

Make sense. The last error TypeError: markdown-link expects href to be a string. is from that.

to produce the TOC..

Yes. The minimum is to set <!-- toc -->.

edit:

and verb:tasks:["readme"]

needed if you want to run just verb instead of verb readme every time.

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

@tunnckoCore

npm install -g verb-readme-generator
/home/alexander/.nvm/versions/node/v5.8.0/lib
└── verb-readme-generator@0.1.6 

executing:

 ✘ alexander@alexander-w541-laptop  ~/Workspace/new-project  verb readme
[TypeError: base-runner#runner utils.union is not a function]

But sadly, now I get that TypeError regardles.. WTF

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

@tunnckoCore Hm, If i run:

verb readme

I get that error, regardless now if I have verb-readme-generator installed locally or globally, but if I run

verb --toc

The globally installed verb-readme-generator burps out this:

alexander@alexander-w541-laptop  ~/Workspace/new-project  npm install -g verb-readme-generator
/home/alexander/.nvm/versions/node/v5.8.0/lib
└─┬ verb-readme-generator@0.1.6 
  ├── async@1.5.2 
  ├─┬ debug@2.2.0 
  │ └── ms@0.7.1 
  ├─┬ extend-shallow@2.0.1 
  │ └── is-extendable@0.1.1 
  ├─┬ generate-defaults@0.1.6 
  │ ├─┬ common-middleware@0.2.6 
  │ │ └─┬ parser-front-matter@1.3.0 
  │ │   └── lazy-cache@0.2.7 
  │ ├─┬ engine-base@0.1.2 
  │ │ ├── component-emitter@1.2.0 
  │ │ ├─┬ delimiter-regex@1.3.1 
  │ │ │ └─┬ extend-shallow@1.1.4 
  │ │ │   └── kind-of@1.1.0 
  │ │ ├─┬ engine@0.1.11 
  │ │ │ ├─┬ assign-deep@0.4.4 
  │ │ │ │ ├── assign-symbols@0.1.1 
  │ │ │ │ └── kind-of@2.0.1 
  │ │ │ ├─┬ collection-visit@0.2.1 
  │ │ │ │ ├── lazy-cache@0.2.7 
  │ │ │ │ ├─┬ map-visit@0.1.4 
  │ │ │ │ │ ├── lazy-cache@0.2.7 
  │ │ │ │ │ └── object-visit@0.3.4 
  │ │ │ │ └─┬ object-visit@0.2.1 
  │ │ │ │   └── isobject@1.0.2 
  │ │ │ ├─┬ get-value@1.3.1 
  │ │ │ │ ├── arr-flatten@1.0.1 
  │ │ │ │ └── noncharacters@1.1.0 
  │ │ │ ├── kind-of@2.0.1 
  │ │ │ ├── lazy-cache@0.2.7 
  │ │ │ └─┬ set-value@0.2.0 
  │ │ │   └── isobject@1.0.2 
  │ │ ├── engine-utils@0.1.1 
  │ │ ├── lazy-cache@0.2.7 
  │ │ ├── object.omit@2.0.0 
  │ │ └── object.pick@1.1.2 
  │ ├─┬ generate-collections@0.1.5 
  │ │ └─┬ falsey@0.3.0 
  │ │   └── kind-of@3.0.2 
  │ ├─┬ isobject@2.0.0 
  │ │ └── isarray@0.0.1 
  │ ├─┬ mixin-deep@1.1.3 
  │ │ └── for-in@0.1.4 
  │ └── parse-github-url@0.3.0 
  ├─┬ get-pkg@0.2.1 
  │ └── min-request@1.4.1 
  ├── get-value@2.0.3 
  ├─┬ git-user-name@1.2.0 
  │ ├── git-config-path@0.1.0 
  │ └─┬ parse-git-config@0.4.0 
  │   └── ini@1.3.4 
  ├─┬ helper-apidocs@0.5.1 
  │ ├─┬ is-glob@2.0.1 
  │ │ └── is-extglob@1.0.0 
  │ ├─┬ js-comments@0.5.4 
  │ │ ├── arr-union@2.1.0 
  │ │ ├── js-comments-template@0.7.2 
  │ │ ├── lodash@3.10.1 
  │ │ ├─┬ logging-helpers@0.4.0 
  │ │ │ └─┬ chalk@1.1.1 
  │ │ │   ├─┬ ansi-styles@2.2.0 
  │ │ │   │ └── color-convert@1.0.0 
  │ │ │   ├── escape-string-regexp@1.0.5 
  │ │ │   ├─┬ has-ansi@2.0.0 
  │ │ │   │ └── ansi-regex@2.0.0 
  │ │ │   ├── strip-ansi@3.0.1 
  │ │ │   └── supports-color@2.0.0 
  │ │ ├─┬ parse-comments@0.4.3 
  │ │ │ ├─┬ arrayify-compact@0.1.0 
  │ │ │ │ └── array-flatten@2.0.0 
  │ │ │ ├─┬ extract-comments@0.7.3 
  │ │ │ │ └── is-whitespace@0.3.0 
  │ │ │ ├── gfm-code-blocks@0.2.2 
  │ │ │ ├── inflection@1.8.0 
  │ │ │ └── parse-code-context@0.1.3 
  │ │ └── write@0.2.1 
  │ ├─┬ matched@0.4.1 
  │ │ ├── arr-union@3.1.0 
  │ │ ├── bluebird@3.3.4 
  │ │ ├─┬ glob@6.0.4 
  │ │ │ ├─┬ inflight@1.0.4 
  │ │ │ │ └── wrappy@1.0.1 
  │ │ │ ├── inherits@2.0.1 
  │ │ │ ├─┬ minimatch@3.0.0 
  │ │ │ │ └─┬ brace-expansion@1.1.3 
  │ │ │ │   ├── balanced-match@0.3.0 
  │ │ │ │   └── concat-map@0.0.1 
  │ │ │ ├── once@1.3.3 
  │ │ │ └── path-is-absolute@1.0.0 
  │ │ └─┬ resolve-dir@0.1.0 
  │ │   ├─┬ expand-tilde@1.2.0 
  │ │   │ └── user-home@1.1.1 
  │ │   └─┬ global-modules@0.2.1 
  │ │     ├── global-prefix@0.1.2 
  │ │     └── is-windows@0.1.1 
  │ ├── relative@3.0.2 
  │ └── template-bind-helpers@0.2.0 
  ├─┬ helper-copyright@2.1.0 
  │ ├── markdown-link@0.1.1 
  │ ├─┬ update-copyright@0.2.3 
  │ │ ├── leven@2.0.0 
  │ │ ├─┬ parse-copyright@0.4.0 
  │ │ │ └── copyright-regex@1.1.5 
  │ │ └─┬ update-year@0.5.2 
  │ │   └── array-unique@0.2.1 
  │ └── year@0.2.1 
  ├─┬ helper-date@0.2.2 
  │ ├─┬ date.js@0.2.2 
  │ │ └── debug@0.7.4 
  │ ├─┬ extend-shallow@1.1.4 
  │ │ └── kind-of@1.1.0 
  │ ├─┬ kind-of@2.0.1 
  │ │ └── is-buffer@1.1.3 
  │ └── moment@2.12.0 
  ├─┬ helper-issue@0.3.0 
  │ └── parse-github-url@0.2.1 
  ├─┬ helper-reflinks@3.1.4 
  │ ├─┬ ansi-colors@0.1.0 
  │ │ ├── ansi-bgblack@0.1.1 
  │ │ ├── ansi-bgblue@0.1.1 
  │ │ ├── ansi-bgcyan@0.1.1 
  │ │ ├── ansi-bggreen@0.1.1 
  │ │ ├── ansi-bgmagenta@0.1.1 
  │ │ ├── ansi-bgred@0.1.1 
  │ │ ├── ansi-bgwhite@0.1.1 
  │ │ ├── ansi-bgyellow@0.1.1 
  │ │ ├── ansi-black@0.1.1 
  │ │ ├── ansi-blue@0.1.1 
  │ │ ├── ansi-bold@0.1.1 
  │ │ ├── ansi-cyan@0.1.1 
  │ │ ├── ansi-dim@0.1.1 
  │ │ ├── ansi-gray@0.1.1 
  │ │ ├── ansi-grey@0.1.1 
  │ │ ├── ansi-hidden@0.1.1 
  │ │ ├── ansi-inverse@0.1.1 
  │ │ ├── ansi-italic@0.1.1 
  │ │ ├── ansi-magenta@0.1.1 
  │ │ ├── ansi-red@0.1.1 
  │ │ ├── ansi-reset@0.1.1 
  │ │ ├── ansi-strikethrough@0.1.1 
  │ │ ├── ansi-underline@0.1.1 
  │ │ ├── ansi-white@0.1.1 
  │ │ ├── ansi-yellow@0.1.1 
  │ │ └── lazy-cache@0.2.7 
  │ ├── arr-union@3.1.0 
  │ ├── async-array-reduce@0.1.0 
  │ ├─┬ data-store@0.15.5 
  │ │ ├─┬ cache-base@0.8.2 
  │ │ │ ├── has-value@0.3.0 
  │ │ │ ├─┬ set-value@0.3.3 
  │ │ │ │ └─┬ to-object-path@0.2.0 
  │ │ │ │   └── is-arguments@1.0.2 
  │ │ │ ├── to-object-path@0.3.0 
  │ │ │ └─┬ unset-value@0.1.1 
  │ │ │   └── has-value@0.2.1 
  │ │ ├─┬ clone-deep@0.2.4 
  │ │ │ ├─┬ is-plain-object@2.0.1 
  │ │ │ │ └── isobject@1.0.2 
  │ │ │ └─┬ shallow-clone@0.1.2 
  │ │ │   ├── kind-of@2.0.1 
  │ │ │   ├── lazy-cache@0.2.7 
  │ │ │   └── mixin-object@2.0.1 
  │ │ ├── graceful-fs@4.1.3 
  │ │ ├── has-own-deep@0.1.4 
  │ │ ├─┬ mkdirp@0.5.1 
  │ │ │ └── minimist@0.0.8 
  │ │ ├─┬ project-name@0.2.4 
  │ │ │ ├─┬ git-repo-name@0.5.1 
  │ │ │ │ ├── cwd@0.9.1 
  │ │ │ │ ├── file-name@0.1.0 
  │ │ │ │ ├── lazy-cache@0.2.7 
  │ │ │ │ └─┬ remote-origin-url@0.4.0 
  │ │ │ │   └── parse-git-config@0.2.0 
  │ │ │ ├── minimist@1.2.0 
  │ │ │ └── try-open@0.1.2 
  │ │ ├─┬ rimraf@2.5.2 
  │ │ │ └── glob@7.0.3 
  │ │ └─┬ union-value@0.2.3 
  │ │   ├── arr-union@3.1.0 
  │ │   └─┬ set-value@0.3.3 
  │ │     └── to-object-path@0.2.0 
  │ ├── get-pkgs@0.4.0 
  │ ├── is-valid-glob@0.3.0 
  │ ├─┬ load-pkg@3.0.1 
  │ │ └─┬ find-pkg@0.1.1 
  │ │   └── find-file-up@0.1.1 
  │ ├── markdown-reference@0.1.0 
  │ ├── stringify-github-url@0.1.0 
  │ └── success-symbol@0.1.0 
  ├─┬ helper-related@0.13.2 
  │ ├─┬ ansi-green@0.1.1 
  │ │ └── ansi-wrap@0.1.0 
  │ └─┬ arr-filter@1.1.1 
  │   └── make-iterator@0.2.0 
  ├─┬ is-affirmative@0.1.0 
  │ └── affirmative@0.1.1 
  ├── lazy-cache@1.0.3 
  ├─┬ omit-empty@0.3.3 
  │ ├── has-values@0.1.3 
  │ ├── is-date-object@1.0.1 
  │ └─┬ reduce-object@0.1.3 
  │   └── for-own@0.1.3 
  ├─┬ parse-author@0.2.1 
  │ └── author-regex@0.2.1 
  ├─┬ sections@0.1.8 
  │ ├─┬ define-property@0.2.5 
  │ │ └─┬ is-descriptor@0.1.4 
  │ │   ├── is-accessor-descriptor@0.1.6 
  │ │   └── is-data-descriptor@0.1.4 
  │ └─┬ gfm-code-blocks@0.3.0 
  │   └── gfm-code-block-regex@0.2.3 
  ├── update-sections@0.1.0 
  └─┬ verb-toc@0.1.1 
    └─┬ markdown-toc@0.12.5 
      ├─┬ concat-stream@1.5.1 
      │ ├─┬ readable-stream@2.0.6 
      │ │ ├── core-util-is@1.0.2 
      │ │ ├── isarray@1.0.0 
      │ │ ├── process-nextick-args@1.0.6 
      │ │ ├── string_decoder@0.10.31 
      │ │ └── util-deprecate@1.0.2 
      │ └── typedarray@0.0.6 
      ├─┬ gray-matter@2.0.2 
      │ └─┬ js-yaml@3.5.5 
      │   ├─┬ argparse@1.0.7 
      │   │ └── sprintf-js@1.0.3 
      │   └── esprima@2.7.2 
      ├─┬ list-item@1.1.1 
      │ ├─┬ expand-range@1.8.1 
      │ │ └─┬ fill-range@2.2.3 
      │ │   ├── randomatic@1.1.5 
      │ │   └── repeat-element@1.1.2 
      │ └── is-number@2.1.0 
      ├── minimist@1.2.0 
      ├─┬ remarkable@1.6.2 
      │ ├─┬ argparse@0.1.16 
      │ │ ├── underscore@1.7.0 
      │ │ └── underscore.string@2.4.0 
      │ └── autolinker@0.15.3 
      └── repeat-string@1.5.4 

 alexander@alexander-w541-laptop  ~/Workspace/new-project  verb --toc
GeneratorError: generator [default] reason: task "readme" is not registered
    at getTaskFn (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/composer/lib/resolve.js:50:11)
    at Verb.module.exports (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/composer/lib/resolve.js:35:13)
    at /home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/composer/lib/flow.js:20:23
    at Verb.Composer.build (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/composer/index.js:154:10)
    at Verb.<anonymous> (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/base-generators/index.js:540:13)
    at /home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/async/lib/async.js:52:16
    at /home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/async/lib/async.js:269:32
    at /home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/async/lib/async.js:44:16
    at Verb.<anonymous> (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/base-runner/lib/config/tasks.js:6:5)
    at MapConfig.<anonymous> (/home/alexander/.nvm/versions/node/v5.8.0/lib/node_modules/verb/node_modules/map-config/index.js:171:17)
ENV: undefined

And locally:

 alexander@alexander-w541-laptop  ~/Workspace/new-project  npm install verb-readme-generator --save-dev    
npm WARN prefer global project-name@0.2.4 should be installed with -g
asdsad@0.1.1 /home/alexander/Workspace/new-project
└─┬ verb-readme-generator@0.1.6 
  ├── async@1.5.2 
  ├─┬ debug@2.2.0 
  │ └── ms@0.7.1 
  ├─┬ extend-shallow@2.0.1 
  │ └── is-extendable@0.1.1 
  ├─┬ generate-defaults@0.1.6 
  │ ├─┬ common-middleware@0.2.6 
  │ │ └─┬ parser-front-matter@1.3.0 
  │ │   └── lazy-cache@0.2.7 
  │ ├─┬ engine-base@0.1.2 
  │ │ ├── component-emitter@1.2.0 
  │ │ ├─┬ delimiter-regex@1.3.1 
  │ │ │ └─┬ extend-shallow@1.1.4 
  │ │ │   └── kind-of@1.1.0 
  │ │ ├─┬ engine@0.1.11 
  │ │ │ ├─┬ assign-deep@0.4.4 
  │ │ │ │ ├── assign-symbols@0.1.1 
  │ │ │ │ └── kind-of@2.0.1 
  │ │ │ ├─┬ collection-visit@0.2.1 
  │ │ │ │ ├── lazy-cache@0.2.7 
  │ │ │ │ ├─┬ map-visit@0.1.4 
  │ │ │ │ │ ├── lazy-cache@0.2.7 
  │ │ │ │ │ └── object-visit@0.3.4 
  │ │ │ │ └─┬ object-visit@0.2.1 
  │ │ │ │   └── isobject@1.0.2 
  │ │ │ ├─┬ get-value@1.3.1 
  │ │ │ │ ├── arr-flatten@1.0.1 
  │ │ │ │ └── noncharacters@1.1.0 
  │ │ │ ├── kind-of@2.0.1 
  │ │ │ ├── lazy-cache@0.2.7 
  │ │ │ └─┬ set-value@0.2.0 
  │ │ │   └── isobject@1.0.2 
  │ │ ├── engine-utils@0.1.1 
  │ │ ├── lazy-cache@0.2.7 
  │ │ ├── object.omit@2.0.0 
  │ │ └── object.pick@1.1.2 
  │ ├─┬ generate-collections@0.1.5 
  │ │ └─┬ falsey@0.3.0 
  │ │   └── kind-of@3.0.2 
  │ ├─┬ isobject@2.0.0 
  │ │ └── isarray@0.0.1 
  │ ├─┬ mixin-deep@1.1.3 
  │ │ └── for-in@0.1.4 
  │ └── parse-github-url@0.3.0 
  ├─┬ get-pkg@0.2.1 
  │ └── min-request@1.4.1 
  ├── get-value@2.0.3 
  ├─┬ git-user-name@1.2.0 
  │ ├── git-config-path@0.1.0 
  │ └─┬ parse-git-config@0.4.0 
  │   └── ini@1.3.4 
  ├─┬ helper-apidocs@0.5.1 
  │ ├─┬ is-glob@2.0.1 
  │ │ └── is-extglob@1.0.0 
  │ ├─┬ js-comments@0.5.4 
  │ │ ├── arr-union@2.1.0 
  │ │ ├── js-comments-template@0.7.2 
  │ │ ├── lodash@3.10.1 
  │ │ ├─┬ logging-helpers@0.4.0 
  │ │ │ └─┬ chalk@1.1.1 
  │ │ │   ├─┬ ansi-styles@2.2.0 
  │ │ │   │ └── color-convert@1.0.0 
  │ │ │   ├── escape-string-regexp@1.0.5 
  │ │ │   ├─┬ has-ansi@2.0.0 
  │ │ │   │ └── ansi-regex@2.0.0 
  │ │ │   ├── strip-ansi@3.0.1 
  │ │ │   └── supports-color@2.0.0 
  │ │ ├─┬ parse-comments@0.4.3 
  │ │ │ ├─┬ arrayify-compact@0.1.0 
  │ │ │ │ └── array-flatten@2.0.0 
  │ │ │ ├─┬ extract-comments@0.7.3 
  │ │ │ │ └── is-whitespace@0.3.0 
  │ │ │ ├── gfm-code-blocks@0.2.2 
  │ │ │ ├── inflection@1.8.0 
  │ │ │ ├── lodash@3.10.1 
  │ │ │ └── parse-code-context@0.1.3 
  │ │ └── write@0.2.1 
  │ ├─┬ matched@0.4.1 
  │ │ ├── arr-union@3.1.0 
  │ │ ├── bluebird@3.3.4 
  │ │ ├── glob@6.0.4 
  │ │ └─┬ resolve-dir@0.1.0 
  │ │   ├─┬ expand-tilde@1.2.0 
  │ │   │ └── user-home@1.1.1 
  │ │   └─┬ global-modules@0.2.1 
  │ │     ├── global-prefix@0.1.2 
  │ │     └── is-windows@0.1.1 
  │ ├── relative@3.0.2 
  │ └── template-bind-helpers@0.2.0 
  ├─┬ helper-copyright@2.1.0 
  │ ├── markdown-link@0.1.1 
  │ ├─┬ update-copyright@0.2.3 
  │ │ ├── leven@2.0.0 
  │ │ ├─┬ parse-copyright@0.4.0 
  │ │ │ └── copyright-regex@1.1.5 
  │ │ └─┬ update-year@0.5.2 
  │ │   └── array-unique@0.2.1 
  │ └── year@0.2.1 
  ├─┬ helper-date@0.2.2 
  │ ├─┬ date.js@0.2.2 
  │ │ └── debug@0.7.4 
  │ ├─┬ extend-shallow@1.1.4 
  │ │ └── kind-of@1.1.0 
  │ ├─┬ kind-of@2.0.1 
  │ │ └── is-buffer@1.1.3 
  │ └── moment@2.12.0 
  ├─┬ helper-issue@0.3.0 
  │ └── parse-github-url@0.2.1 
  ├─┬ helper-reflinks@3.1.4 
  │ ├─┬ ansi-colors@0.1.0 
  │ │ ├── ansi-bgblack@0.1.1 
  │ │ ├── ansi-bgblue@0.1.1 
  │ │ ├── ansi-bgcyan@0.1.1 
  │ │ ├── ansi-bggreen@0.1.1 
  │ │ ├── ansi-bgmagenta@0.1.1 
  │ │ ├── ansi-bgred@0.1.1 
  │ │ ├── ansi-bgwhite@0.1.1 
  │ │ ├── ansi-bgyellow@0.1.1 
  │ │ ├── ansi-black@0.1.1 
  │ │ ├── ansi-blue@0.1.1 
  │ │ ├── ansi-bold@0.1.1 
  │ │ ├── ansi-cyan@0.1.1 
  │ │ ├── ansi-dim@0.1.1 
  │ │ ├── ansi-gray@0.1.1 
  │ │ ├── ansi-grey@0.1.1 
  │ │ ├── ansi-hidden@0.1.1 
  │ │ ├── ansi-inverse@0.1.1 
  │ │ ├── ansi-italic@0.1.1 
  │ │ ├── ansi-magenta@0.1.1 
  │ │ ├── ansi-red@0.1.1 
  │ │ ├── ansi-reset@0.1.1 
  │ │ ├── ansi-strikethrough@0.1.1 
  │ │ ├── ansi-underline@0.1.1 
  │ │ ├── ansi-white@0.1.1 
  │ │ ├── ansi-yellow@0.1.1 
  │ │ └── lazy-cache@0.2.7 
  │ ├── arr-union@3.1.0 
  │ ├── async-array-reduce@0.1.0 
  │ ├─┬ data-store@0.15.5 
  │ │ ├─┬ cache-base@0.8.2 
  │ │ │ ├── has-value@0.3.0 
  │ │ │ ├─┬ set-value@0.3.3 
  │ │ │ │ └─┬ to-object-path@0.2.0 
  │ │ │ │   └── is-arguments@1.0.2 
  │ │ │ ├── to-object-path@0.3.0 
  │ │ │ └─┬ unset-value@0.1.1 
  │ │ │   └── has-value@0.2.1 
  │ │ ├─┬ clone-deep@0.2.4 
  │ │ │ ├─┬ is-plain-object@2.0.1 
  │ │ │ │ └── isobject@1.0.2 
  │ │ │ └─┬ shallow-clone@0.1.2 
  │ │ │   ├── kind-of@2.0.1 
  │ │ │   ├── lazy-cache@0.2.7 
  │ │ │   └── mixin-object@2.0.1 
  │ │ ├── graceful-fs@4.1.3 
  │ │ ├── has-own-deep@0.1.4 
  │ │ ├─┬ mkdirp@0.5.1 
  │ │ │ └── minimist@0.0.8 
  │ │ ├─┬ project-name@0.2.4 
  │ │ │ ├─┬ git-repo-name@0.5.1 
  │ │ │ │ ├── cwd@0.9.1 
  │ │ │ │ ├── file-name@0.1.0 
  │ │ │ │ ├── lazy-cache@0.2.7 
  │ │ │ │ └─┬ remote-origin-url@0.4.0 
  │ │ │ │   └── parse-git-config@0.2.0 
  │ │ │ ├── minimist@1.2.0 
  │ │ │ └── try-open@0.1.2 
  │ │ └─┬ union-value@0.2.3 
  │ │   ├── arr-union@3.1.0 
  │ │   └─┬ set-value@0.3.3 
  │ │     └── to-object-path@0.2.0 
  │ ├── get-pkgs@0.4.0 
  │ ├── is-valid-glob@0.3.0 
  │ ├─┬ load-pkg@3.0.1 
  │ │ └─┬ find-pkg@0.1.1 
  │ │   └── find-file-up@0.1.1 
  │ ├── markdown-reference@0.1.0 
  │ ├── stringify-github-url@0.1.0 
  │ └── success-symbol@0.1.0 
  ├─┬ helper-related@0.13.2 
  │ ├─┬ ansi-green@0.1.1 
  │ │ └── ansi-wrap@0.1.0 
  │ └─┬ arr-filter@1.1.1 
  │   └── make-iterator@0.2.0 
  ├─┬ is-affirmative@0.1.0 
  │ └── affirmative@0.1.1 
  ├── lazy-cache@1.0.3 
  ├─┬ omit-empty@0.3.3 
  │ ├── has-values@0.1.3 
  │ ├── is-date-object@1.0.1 
  │ └─┬ reduce-object@0.1.3 
  │   └── for-own@0.1.3 
  ├─┬ parse-author@0.2.1 
  │ └── author-regex@0.2.1 
  ├─┬ sections@0.1.8 
  │ ├─┬ define-property@0.2.5 
  │ │ └─┬ is-descriptor@0.1.4 
  │ │   ├── is-accessor-descriptor@0.1.6 
  │ │   └── is-data-descriptor@0.1.4 
  │ └─┬ gfm-code-blocks@0.3.0 
  │   └── gfm-code-block-regex@0.2.3 
  ├── update-sections@0.1.0 
  └─┬ verb-toc@0.1.1 
    └─┬ markdown-toc@0.12.5 
      ├─┬ concat-stream@1.5.1 
      │ ├─┬ readable-stream@2.0.6 
      │ │ ├── core-util-is@1.0.2 
      │ │ ├── isarray@1.0.0 
      │ │ ├── process-nextick-args@1.0.6 
      │ │ ├── string_decoder@0.10.31 
      │ │ └── util-deprecate@1.0.2 
      │ └── typedarray@0.0.6 
      ├─┬ gray-matter@2.0.2 
      │ └─┬ js-yaml@3.5.5 
      │   ├─┬ argparse@1.0.7 
      │   │ └── sprintf-js@1.0.3 
      │   └── esprima@2.7.2 
      ├─┬ list-item@1.1.1 
      │ ├─┬ expand-range@1.8.1 
      │ │ └─┬ fill-range@2.2.3 
      │ │   ├── randomatic@1.1.5 
      │ │   └── repeat-element@1.1.2 
      │ └── is-number@2.1.0 
      ├── minimist@1.2.0 
      ├─┬ remarkable@1.6.2 
      │ ├─┬ argparse@0.1.16 
      │ │ ├── underscore@1.7.0 
      │ │ └── underscore.string@2.4.0 
      │ └── autolinker@0.15.3 
      └── repeat-string@1.5.4 

 alexander@alexander-w541-laptop  ~/Workspace/new-project  verb readme
[TypeError: base-runner#runner utils.union is not a function]
 ✘ alexander@alexander-w541-laptop  ~/Workspace/new-project  verb --toc
[17:16:50] starting readme generator
[17:16:50] starting readme:readme task
[17:16:50] starting readme generator
[17:16:50] finished readme generator 50ms
[17:16:50] finished readme:readme task 330ms
[17:16:50] finished readme generator 312ms
[17:16:50] finished ✔

Success..

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

And the package.json-config for verb looks like this:

"verb": {
"toc": true,
"layout": "default",
"tasks": [
    "readme"
  ]
}

@phun-ky
Copy link
Author

phun-ky commented Mar 26, 2016

@tunnckoCore @jonschlinkert and just to be clear, the doc for verb-readme-generator-> https://github.com/verbose/verb-readme-generator says that you install it as a devDep: https://github.com/verbose/verb-readme-generator#install

@tunnckoCore
Copy link

says that you install it as a devDep:

yea, verb look on both places and can load from both places, but better is to be instaleld globally, it not make sense to install it for every project - cost at least dev time.

alexander@alexander-w541-laptop  ~/Workspace/new-project  verb readme
[TypeError: base-runner#runner utils.union is not a function]

It's another issue (it's easy), that I also have, but didn't opened issue - I'll open now or I'll PR directly there.

So, finally, locally works? If that works, maybe Jon more clear idea now what and why is happening.
But I still can't realize why fails, even when follow me, doing everything that I do every minute. I'm sure you missing something and maybe will need recap from the beginning - re-read the thread and wait @jonschlinkert response.

edit: Opened base/base-runner#5 for utils.union error.

@jonschlinkert
Copy link
Member

utils.union is not a function]

well, we're making progress lol. that's a bug related to adding config defaults. like @tunnckoCore says that should be easy to fix. In the meantime, try running verb --init in that project, just to see if that gets rid of the error.

@jonschlinkert
Copy link
Member

Made it work.. But to get this to work, these criteria has to be met:

remember we're still on dev brach. sorry for the issues but this feedback helps us a lot.

some of these things sound like they work as expected, some do not:

  • "Install verb#dev globally"
  • "Install verb-readme-generator locally (pref with --save-dev)" this should only need to be installed globally
  • "Have a .verb.md file" verb will ask you if you want to add one. I have this working locally
  • "Have a package.json-config which HAS TO contain these attributes with correct values: author:name, author:url, repository, and verb:tasks:["readme"],verb:layout" Theverb` property should be optional. If this is causing problems that's a bug. Author can be a string or object. Verb parses package.json.
  • "I think some of the attributes has to be set to use the default layout, but you have to set a layout it seems to produce the TOC." If you use your own layout, you need to add <!-- toc -->, or if you use a verb layout you need to enable the toc either by setting toc: true in verb config in package.json, or by passing --toc on the command line. but the latter will only add it that time. It doesn't persist

@jonschlinkert
Copy link
Member

closing since TOC logic has been updated a few times since this issue, and verb uses the verb-toc plugin for this. If you still have issues with toc please open an issue on verb-toc or verb-readme-generator if that's what you're using

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

3 participants