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

Add shortcut for resolving relative paths #15

Closed
wants to merge 3 commits into
base: master
from

Conversation

2 participants
@denysdovhan
Copy link

denysdovhan commented Nov 7, 2015

I like meow and want to make it better.

In my own cli apps I often write cwd-method that resolves relative filenames and current working dir. So, I propose to add this feature into meow.

I've already written tests and desc for cwd-method, so please check my changes and merge if it'll be useful for everyone.

@sindresorhus

This comment has been minimized.

Copy link
Owner

sindresorhus commented Nov 7, 2015

Can you provide an example of when you would need something like this?

@denysdovhan

This comment has been minimized.

Copy link

denysdovhan commented Nov 7, 2015

Of course.
Here is example from textr-cli, that reads stdin or specified filename

@sindresorhus

This comment has been minimized.

Copy link
Owner

sindresorhus commented Nov 7, 2015

All those uses are moot, though. You can pass relative paths directly to any core method, including the fs methods. No need to resolve it first.

@denysdovhan

This comment has been minimized.

Copy link

denysdovhan commented Nov 7, 2015

Hmm. Sometimes I have problems with relative paths. Maybe it only my fault.

@sindresorhus

This comment has been minimized.

Copy link
Owner

sindresorhus commented Nov 7, 2015

Yeah, I'm gonna pass on this. I very seldom have the need to resolve my paths and when I do, it's only path.resolve('.', filename).

@denysdovhan denysdovhan deleted the denysdovhan:cwd branch Nov 7, 2015

@denysdovhan denysdovhan restored the denysdovhan:cwd branch Nov 7, 2015

@denysdovhan

This comment has been minimized.

Copy link

denysdovhan commented Nov 7, 2015

Okay, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment