Skip to content

Skip certain files #340

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

Closed
arturi opened this issue Jan 26, 2016 · 5 comments
Closed

Skip certain files #340

arturi opened this issue Jan 26, 2016 · 5 comments

Comments

@arturi
Copy link

arturi commented Jan 26, 2016

Hey, thanks for the amazing work, I’m using Documentation and loving it.

Recently I’ve encountered a problem where Documentation throws an error when trying to parse a .ejs file which I import. It works for me, because I have Browserify set up to automagically pre-compile .ejs files and return a function with ejsify. But Documentation doesn’t know about that. I narrowed in down to Babylon — it seems like that’s what’s choking on non-js files. Is there a way to skip certain extensions or files?

Similar error was thrown when I used this syntax in .js:

function promiseWaterfall([resolvedPromise, ...tasks]) {
  finalTaskPromise = tasks.reduce(function(prevTaskPromise, task) {
      return prevTaskPromise.then(task);
  }, resolvedPromise([]));  // initial value

  return finalTaskPromise;
}

This is a new rest syntax from ES6 and it totally works, but Documentation dies on it. Should it maybe just skip something it can’t parse instead of throwing?

@kvz
Copy link

kvz commented Jan 27, 2016

+1 for having the option to instruct Documentation to gracefully skip past what it perceives as syntax errors

@tmcw
Copy link
Member

tmcw commented Jan 27, 2016

The filter_js code should prevent this from happening - I'll add a test confirming that behavior, and can you test with v4.0.0-beta to see if it's fixed in the new version?

@arturi
Copy link
Author

arturi commented Jan 27, 2016

Checked v4.0.0-beta — works fine 👍, thank you!

@kvz
Copy link

kvz commented Jan 27, 2016

💟

@tmcw
Copy link
Member

tmcw commented Mar 19, 2016

👍 test-covered in fe2c5af

@tmcw tmcw closed this as completed Mar 19, 2016
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