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

bug with setting --set badges in CLI #52

Open
tunnckoCore opened this issue May 9, 2015 · 6 comments
Open

bug with setting --set badges in CLI #52

tunnckoCore opened this issue May 9, 2015 · 6 comments

Comments

@tunnckoCore
Copy link

I tried everything but cant figure out how to define custom templates path with --set. I mean, there pops up some ugly stack trace.

[charlike@localhost is-kindof]$ verb

[07:04:01] using verbfile ~/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb-default/index.js
[07:04:01] starting 'default'
[07:04:01] finished 'default' after 46 ms
[TypeError: Cannot read property 'render' of null]
[TypeError: undefined is not a function]
[TypeError: undefined is not a function]
/home/charlike/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb/node_modules/session-cache/node_modules/continuation-local-storage/context.js:78
      throw exception;
            ^
TypeError: undefined is not a function
    at DestroyableTransform._transform (/home/charlike/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb/lib/plugins/dest.js:44:26)
    at DestroyableTransform.Transform._read (/home/charlike/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (/home/charlike/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/home/charlike/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/home/charlike/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at DestroyableTransform.Writable.write (/home/charlike/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at Stream.method [as write] (/home/charlike/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb/node_modules/event-stream/node_modules/duplexer/index.js:47:39)
    at Stream.ondata (stream.js:32:26)
    at Stream.<anonymous> (/home/charlike/.nvm/versions/io.js/v2.0.0/lib/node_modules/verb-cli/node_modules/verb/node_modules/session-cache/node_modules/continuation-local-storage/context.js:74:17)
    at emitOne (events.js:77:13)

when I set --set badges="/home/charlike/dev/verb-config/badges which is https://github.com/verbose/readme-badges with costumized templates.

I guess the bug is also for --set includes and etc.

@tunnckoCore
Copy link
Author

When I debug I found that https://github.com/assemble/verb/blob/master/lib/transforms/init/load.js, and it seems that all is okey -- setting and getting the path. The problem is loading the template files from templates directory.

@jonschlinkert
Copy link
Member

I already fixed this locally. I'll push up the fix in a bit

@jonschlinkert
Copy link
Member

btw, verb is almost instant for me. the only "slowness" is when it hits the github API to pull down reflinks.

@tunnckoCore
Copy link
Author

I'll push up the fix in a bit

ookey.

btw, verb is almost instant for me.

almost, lol. 30-40ms for just one badge isn't instant for me. Yea, there's no logic to use verb for just one badge (and no one would use it like that), but yea.

@jonschlinkert
Copy link
Member

9.82 ms for me:

screen shot 2015-05-09 at 10 08 03 pm

Yea, there's no logic to use verb for just one badge (and no one would use it like that), but yea.

well, there are always tradeoffs. for me, verb runs almost as fast as gulp - there will be a small bump because verb has to load the user's environment (package.json, ./.git config, etc).

IMHO, given that verb is a documentation generator, micro-optimization will never be as important as user convenience and good documentation. Honestly I haven't even gotten a chance to release what I would consider "the cool stuff". Verb can easily generate full documentation websites for example.

There is no documentation generator on github, in any language, that can touch what verb is able to do. Especially given that verb can implement the others as plugins.

All I'm trying to say is, please stop mentioning the speed. I don't mean to say I don't care, but I don't care ;)

@tunnckoCore
Copy link
Author

No, no, I understand it is absolutely normal to run as fast as gulp. But yea, maybe I should stop thinking about gulp family, lol 😈

Ping me we you pushed it up, cuz I need it to try (and maybe start using) new v0.7 verb :) 👍
Because I need more and more automation and faster development because the shitty long todo list. lol

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