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

Forcing docs to use the cwd as file base #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kelsin
Copy link

@kelsin kelsin commented Oct 31, 2014

This is a pull request meant to add to the discussion on #4

This is a pretty ugly hack

The only way I was able to get gulp-yuidoc to write docs with relative path names is to set the base on my files in this plugin. Doing it via gulp.src would cause weird behavior where I would have to check vinyl.base in lib/parser.js and pass vinyl.path or vinyl.relative and that felt like an even bigger hack.

This solution just sets the file base to vinyl.cwd and then passes the relative path into the filemap and dirmap.

Concerns: I'm very concerned that doing this will result in problems if people try to chain other commands in their pipes.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.32%) when pulling 7047159 on kelsin:relative-file-paths into b165187 on jsBoot:master.

@Robdel12
Copy link

+1 for this. I need this for one of my projects.

@josex2r
Copy link

josex2r commented Feb 9, 2016

+1

@nmcclay
Copy link

nmcclay commented Aug 1, 2016

I'm kind of surprised this is still hanging out here. This PR works exactly as I would have imagined it would work by default (the same as yuidoc CLI). If the hack nature of this fix is the concern, perhaps it would be ok to simply give it an option flag in the gulp plugin?

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

Successfully merging this pull request may close these issues.

5 participants