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

Absolute paths & output directory creation #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SassNinja
Copy link

Hi,

I've some issues in my current gulp setup where I'm using style-sherpa.
Precisely 2 issues:

  1. Absolute paths doesn't work since they are getting joined with the cwd path
  2. If the output folder doesn't exist, the stream fails instead of creating that folder

I've fixed both issues in this PR.

@kball would be great if you review and accept this if it's fine

Best regards
Kai

@ryancausey
Copy link

I just ran into this exact issue. Thanks @SassNinja for making this PR!

I do have a question though: why is a ternary statement required? Would it not work to just replace all instances of path.join(process.cwd(), path) with path.resolve(path)? The path.resolve docs appear to indicate that the current working directory will be prepended if the path isn't absolute after processing all string arguments.

@kball any plans on looking at this/merging it soon?

Copy link

@DanielRuf DanielRuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified.

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.

3 participants