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

maybeInclude seems to not work (for me?) #3

Open
tunnckoCore opened this issue Aug 2, 2018 · 4 comments
Open

maybeInclude seems to not work (for me?) #3

tunnckoCore opened this issue Aug 2, 2018 · 4 comments

Comments

@tunnckoCore
Copy link

I have maybeInclude('docs/API.md')

And when it not exists, it's okey.
But when exists it does not includes it.

Using ifExists helpers the things are working correctly.

ifExists('docs/API.md', include('docs/API.md'))

@jonschlinkert
Copy link
Member

maybeInclude seems to not work (for me?)

That's why it's not called definitelyInclude lol. jk

@doowb or I can take a look and see what's happening.

@doowb
Copy link
Member

doowb commented Aug 2, 2018

It looks like 'docs/API.md' would need to be on the context for it to try to include it.

I'm not sure that's entirely correct logic. It might need to be something like:

if (opts[name] || utils.anyExists(name, this.app.cwd)) {
  const fn = this.app.getAsyncHelper(helperName);
  return fn.apply(this, arguments);
}

I think this will find includes that are already on the context and check the filesystem if they aren't.

@tunnckoCore
Copy link
Author

tunnckoCore commented Aug 2, 2018

It's okey to me to use ifExists anyway, i'm just reporting if it's not correct behavior.

Feel free to close if you both decide. ;]

(edit: side note... what you use for terminal recordings (and gifs)? any ideas? ;d)

@jonschlinkert
Copy link
Member

what you use for terminal recordings (and gifs)? any ideas?

I use http://recordit.co/ sometimes. I'd like to find something that is better for terminal recordings though

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