0.9.0
There is still work to do, but this is going to be a lot easier to use than the current verb! I'll add some descriptive comments soon....
@jonschlinkert this is a huge change. I hope you're keeping this up. I have high hopes.
I hope you're keeping this up. I have high hopes.
I am indeed! very much so. It's not always easy to see the connection between related projects, but I'm making commits to the underlying libs that verb uses. I can't wait to share this next release with the world, it's pretty awesome if I do say so myself lol :)
@mightyiam you might be able to download this now and test is if you want :)
NOTE that:
-
licenseno longer a helper by default, it's just a property. You can make it a helper if you want, or just change{%= license() %}to{%= license %}in.verb.md - I haven't gotten to the
apidocshelper yet. I'll be doing that tomorrow.
Also, if you (or anyone) wants to try this out and give feedback on an or all of the following that would be great:
- download verb:
npm i -g verb - run
verbin the command line in a project that has a.verb.md(make sure you note the changes above) - verb should prompt you for basic info
- if you run
verbagain in that project, it should not prompt you again - try doing
verb --initin the same project - try doing
verb --ask, then tryverb --ask=name, then tryverb --ask=name,description - then run
verbagain with no commands, it should use your last answers
Thanks!
@jonschlinkert thank you
Would you mind if I test after you release?
No, of course not! I was just hoping for feedback from someone before I release. Thanks!
My god.. (and i'm not religious guy lol) You know you're awesome and verb is more awesome lol. Almost 2 years work on these things and so much libs, so much freaking lines of code LOL, :beer: I'll try ASAP as I have stable config. I hope I'll be back soon, lol. Maybe this or next weekend.
Thanks! yeah it is, but it all somehow comes together (almost) perfectly :)
We found some bugs this morning, got most of them fixed, so anyone interested in playing around with this should wait until the next push.
verb is more awesome lol.
We think it's pretty great too! I look forward to feedback!
@tunnckoCore if you have time and want to try this out, you can do:
$ npm i -g verbose/verb#dev && npm i -g verb-readme-generator
then run verb readme
I think we're getting close, mostly bugfixes at this point. but the generators are awesome.
if you do, let me know how that goes.
same with generate, if you want to play around with it. To run it you can run generators with the gen command. so gen foo would run the foo generator. to run a sub-generator on foo you would do gen foo.bar
@jonschlinkert thanks for the ping!
I'll try later today after the exam.
But by quick look it seems verb-readme-generator currently not exist in npm. :)
But by quick look it seems verb-readme-generator currently not exist in npm. :)
it does now ... lol
thanks for the heads up!
btw, this file is a generator, in case you want to see a working example. it's has a lot in it, some things might get moved out, but it's a good example
Yea, noticed. Btw, i think you should set default name of readme to be README.md it is more visible and widely used. We want sane defaults, yea? :)
But yea other than that, great - absolutely unreal :D
@jonschlinkert strange. Gives me ENOENT error that bin/verb.js missing, but it's there when look at repo, and it also is correct in package.json. Any ideas? hmm.
you know...
npm WARN deprecated [email protected]: `base-options` has been deprecated and renamed to `base-option`. See https://github.com/node-base/base-option
npm ERR! Linux 4.4.1-2-ARCH
npm ERR! argv "/usr/bin/node" "/usr/local/bin/npm" "i" "-g" "verbose/verb#dev"
npm ERR! node v5.6.0
npm ERR! npm v3.7.1
npm ERR! path /usr/local/lib/node_modules/verb/bin/verb.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/verb/bin/verb.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/verb/bin/verb.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/charlike/dev/npm-debug.log
I think cause is bin/verb.js permissions. It is specially marked as executable on github. It's not needed. npm-related/cli.js and verb/bin/verb.js notice the "Executable File" beside place where github shows filesize and file lines.
@tunnckoCore did you remove any previously globally installed verb and verb-cli modules?
Try doing:
$ npm uninstall -g verb
$ npm uninstall -g verb-cli
$ npm i -g verbose/verb#dev
If you get permission errors on any of those, try going into the global node bin folder and delete the symlinks manually. I don't know if this happened to me because I'm using nvm, but everything installed correctly ensuring all the previous versions were deleted before trying to install the newest.
did you remove any previously globally installed verb and verb-cli modules?
Yea, did it.
If you get permission errors on any of those, try going into the global node bin folder and delete the symlinks manually.
But yea, it's interesting that npm not exits with perm errors, but with enoent. And yea, there's no symlinks, i checked.
@tunnckoCore try installing now with npm i -g verbose/verb#dev. The bin and lib folders were not in the package.json files prop. I think I didn't have the issue because I was doing npm link locally.
like @doowb said, I sometimes have to go into both global node_modules and global bin and delete symlinked modules. if you did that and it didn't work, I'm not sure what's causing that.
I think I didn't have the issue because I was doing npm link locally.
it's @doowb's fault then lol. jk
oo yea, that's the problem, i missed to look files field.
Okey it works now.
@jonschlinkert: then run
verb readme
error, lol.
[charlike@voltaire trans]$ verb readme
[20:37:22] starting default generator
GeneratorError {
message: 'task "readme" is not registered',
name: 'GeneratorError: generator [default] reason',
stack: 'GeneratorError: generator [default] reason: task "readme" is not registered\n at new GeneratorError (/usr/local/lib/node_modules/verb/node_modules/base-generators/lib/cache.js:190:17)\n at Cache.error (/usr/local/lib/node_modules/verb/node_modules/base-generators/lib/cache.js:171:16)\n at Cache.<anonymous> (/usr/local/lib/node_modules/verb/node_modules/base-generators/lib/cache.js:117:40)\n at Verb.Emitter.emit (/usr/local/lib/node_modules/verb/node_modules/component-emitter/index.js:131:20)\n at finishBuild (/usr/local/lib/node_modules/verb/node_modules/composer/index.js:143:12)\n at /usr/local/lib/node_modules/verb/node_modules/composer/lib/flow.js:22:16\n at Verb.Composer.build (/usr/local/lib/node_modules/verb/node_modules/composer/index.js:151:10)\n at Verb.<anonymous> (/usr/local/lib/node_modules/verb/node_modules/base-generators/index.js:454:13)\n at /usr/local/lib/node_modules/verb/node_modules/async/lib/async.js:52:16\n at /usr/local/lib/node_modules/verb/node_modules/async/lib/async.js:269:32' }
{}
verb-readme-generator, installed
[charlike@voltaire trans]$ npm ls -g | grep verb
│ └─┬ [email protected]
├─┬ [email protected] (git://github.com/verbose/verb.git#f6acbe848e637443128f8c3ad73cc7aff157d43b)
├─┬ [email protected]
│ └─┬ [email protected]
Maybe it tries to load given generator from local modules first, because i tried with verbfile.js from the readme
[charlike@voltaire trans]$ verb
[20:41:49] using verbfile ~/dev/verbfile.js
[Error: cannot find generator: verb-readme-generator]
I've reinstalled a couple of times and cleared node_modules locally and globally and I can't reproduce the issue you're having.
Strange.
[charlike@voltaire dev]$ ls /usr/local/lib/node_modules/
npm
[charlike@voltaire verbtest]$ npm i -g verbose/verb#dev verb-readme-generator
[charlike@voltaire verbtest]$ ls /usr/local/lib/node_modules/
npm verb verb-readme-generator
[charlike@voltaire verbtest]$ verb readme
[18:15:44] starting default generator
GeneratorError {
message: 'task "readme" is not registered',
name: 'GeneratorError: generator [default] reason',
stack: 'GeneratorError: generator [default] reason: task "readme" is not registered\n at getTaskFn (/usr/local/lib/node_modules/verb/node_modules/composer/lib/resolve.js:50:11)\n at Verb.module.exports (/usr/local/lib/node_modules/verb/node_modules/composer/lib/resolve.js:35:13)\n at /usr/local/lib/node_modules/verb/node_modules/composer/lib/flow.js:20:23\n at Verb.Composer.build (/usr/local/lib/node_modules/verb/node_modules/composer/index.js:151:10)\n at Verb.<anonymous> (/usr/local/lib/node_modules/verb/node_modules/base-generators/index.js:456:13)\n at /usr/local/lib/node_modules/verb/node_modules/async/lib/async.js:52:16\n at /usr/local/lib/node_modules/verb/node_modules/async/lib/async.js:269:32\n at /usr/local/lib/node_modules/verb/node_modules/async/lib/async.js:44:16\n at MapConfig.<anonymous> (/usr/local/lib/node_modules/verb/node_modules/map-config/index.js:163:14)\n at Immediate.iterate [as _onImmediate] (/usr/local/lib/node_modules/verb/node_modules/async/lib/async.js:262:13)' }
{}
Okey, what should happen with verb readme exactly? Read .verb.md (i understand that it's not needed when using verb-readme-generator, i think that's the point of it, or?) , ask, populates and generates readme.md or? Can you record the process with https://asciinema.org?
I'm just stop using nvm because moved to ArchLinux because want more control on things, and in past I always forgot to update npm/nodejs to latest versions - I don't want to think it.
(i understand that it's not needed when using verb-readme-generator, i think that's the point of it, or?)
no, that might be the problem. you don't need a verbfile.js, but you do need a .verb.md
no, that might be the problem.
Nope. Because it errors thar there's no readme task, so it can't find verb-readme-generator. No matter if I have .verb.md or not, it fails again.
ok, let's get this solved. please double check these and make sure they're all correct. it's totally fine if you missed something... it happens to us constantly when we publish something new.
None of these are "correct" or "wrong", and you gave info on some of them already, but I want to double check so we can learn how you're actually using it, not how you think I "want you to". That will help me make this experience better for everyone:
- [ ] did you delete all
verbrelated files from the globalbindirectory? if not, please do this. It's not sufficient to run npm update, orcache clean. again, make sureverb-cliis deleted too - [ ] did you delete all
verbrelated files from the globalnode_modulesdirectory? these first two are the most likely causes, even though you said you cleared them. many times I've thought the same thing and realized I hadn't afterwards. - [ ] is verb installed globally or locally?
- [ ] is
verb-readme-generatorinstalled indevDependenciesof the project you created? or is it installed globally? or not at all? - [ ] does the project have a package.json? (if not, we'll need to make sure verb doesn't have a problem with that)
- [ ] if so, does the package.json have a
verbconfig object in it? and if so, can you paste it here? - [ ] do you by any chance have a global
verbconfig store in your user home? if so, it's possible that it's using old settings that are conflicting (no idea, just grasping for answers) - [ ] are you using a
verbfile.js? you don't need one to run verb or thereadmetask
if yes*
- [ ] does it export a function or an instance of verb? either should work
- [ ] is
verb-readme-generatorinvoked (with.extendWith()at the top of the exported function?
if no
- [ ] are you changing the
cwd, or passing any other flags besides theverb readmecommand?
can you paste your verbfile and package.json in a gist? or provide any other information that might help us debug?
honestly we were both laughing (not at you, at the situation) b/c this seems to happen every time. it seems like maybe there's something that we're doing that makes our setup "just work", or something you're doing that makes it "not work".
seriously, given how consistent it is that this happens, I think it's a real possibility. I'd love to figure out what the problem is so we don't have to keep going back and forth, and so we can spare other users from the same agony lol.
Yes I deleted all from bin and node_modules directories. Cache cleaned. And actually uninstalled all of the global modules, as you can see in above output - there was only npm. Then, i just installed verb and verb-readme-generator only globally as you suggest firstly.
Recorded screen on asciinema https://asciinema.org/a/dzk7o7sss0fj7xs3t0fnblupk
I don't have any global or local verb configs. Also there's no .verb.md and can't get the point why it could be needed when using verb-readme-generator - as i seen yesterday it have some templates and default layouts?
with locally installed verb-readme-generator and custom .verb.md it seems it works. But what's the point of these "layouts" then when i can't use them and need to write my own verb.md?
with locally installed verb-readme-generator and custom .verb.md it seems it works.
lol I said that earlier though! you need a .verb.md locally.
what's the point
I just haven't gotten to that yet lol. one step at a time!