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 error messages #1

Open
Melindrea opened this issue May 6, 2014 · 7 comments
Open

No error messages #1

Melindrea opened this issue May 6, 2014 · 7 comments

Comments

@Melindrea
Copy link

So, today I ended up having an interesting issue. I'd changed my changelog, rebuilt my docs and everything was dandy ... except, the README file wasn't updated.

Doing a few tricks I figured out it's because I don't know how to YAML (whoops ...), but it would be very useful if grunt-verb could halt or toss out errors when there are such.

@jonschlinkert
Copy link
Member

Good to know, I'll have to think about how to best do this. l'm not sure where the error would be thrown, since data it's hard to know when data should or shouldn't be used. any thoughts?

@Melindrea
Copy link
Author

Well, the CLI version threw some kind of error when I tried it that way.
On 05/06/2014 06:45 PM, Jon Schlinkert wrote:

Good to know, I'll have to think about how to best do this. l'm not
sure where the error would be thrown, since data it's hard to know
when data should or shouldn't be used. any thoughts?


Reply to this email directly or view it on GitHub
#1 (comment).

@jonschlinkert
Copy link
Member

hmm, maybe it's how the context is being merged. can you put some code examples of what you did wrong and what worked?

@Melindrea
Copy link
Author

The error was that my YAML file had a comma where it oughtn't.

I have a fairly standard .verbrc.md file with <%= changelog() %>.
Running grunt verb I get the following:

Running "verb:readme" (verb) task

Done, without errors.

However, no new README.md file was generated. Fully removing grunt verb
and running verb I got the following:

unresolved [ 'verbfile.coffee' ]
   verb-cli [reading] · .verbrc.md

/home/marie/projects/grunt/grunt-epub/node_modules/verb/node_modules/fs-utils/index.js:223
     throw err;
           ^
YAMLException: Failed to parse 
"/home/marie/projects/grunt/grunt-epub/CHANGELOG": JS-YAML: bad 
indentation of a mapping entry at line 2, column 23:
         date: "2014-05-06",

My Gruntfile doesn't have any particular config for verb, using the
standard one.
On 05/06/2014 07:38 PM, Jon Schlinkert wrote:

hmm, maybe it's how the context is being merged. can you put some code
examples of what you did wrong and what worked?


Reply to this email directly or view it on GitHub
#1 (comment).

@doowb
Copy link
Member

doowb commented May 6, 2014

Looks like the verb-cli loads data with plasma automatically, but I don't see that in grunt-verb so this could be the reason no error was being thrown.

After you fixed it the data, does it create the README.md file correctly?

@Melindrea
Copy link
Author

Yep, once I figured out the error and fixed my YAML file everything was
dandy.
On 05/06/2014 08:20 PM, Brian Woodward wrote:

Looks like the verb-cli loads data with plasma
https://github.com/assemble/verb-cli/blob/master/lib/tasks.js#L55
automatically, but I don't see that in grunt-verb so this could be the
reason no error was being thrown.

After you fixed it the data, does it create the README.md file correctly?


Reply to this email directly or view it on GitHub
#1 (comment).

@jonschlinkert
Copy link
Member

ok, that was what I was wondering but didn't have a chance to check. so @doowb it sounds like plasma is throwing the error, which is a good thing. gives us a starting point, thanks

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