-
Notifications
You must be signed in to change notification settings - Fork 136
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
SCSS converter: expand @config["source"] to be "safer". #55
Conversation
|
||
private | ||
def site_source | ||
@site_source ||= File.expand_path(@config["source"]).freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's being passed to Jekyll.sanitized_path
in 2/3 places is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Jekyll.sanitized_path
does not expand the base directory, so we have to do that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jekyll.sanitized_path does not expand the base directory, so we have to do that here.
Would the smarter fix be to do that there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the one hand, that would mean you can pass any directory and it'll auto-expand, on the other File.expand_path
calls are pretty expensive and we use this function a lot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd also lock us to a particular Jekyll version.
end | ||
|
||
# Expand file globs (e.g. `node_modules/*/node_modules` ) | ||
Dir.chdir(@config["source"]) do | ||
Dir.chdir(site_source) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need Jekyll.sanitized_path
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe so – Jekyll.sanitized_path just ensures the first argument is a prefix for the second argument, so we wouldn't be saving anything there.
@jekyllbot: merge +bug |
* 'master' of https://github.com/jekyll/jekyll-sass-converter: Update history to reflect merge of #55 [ci skip] Ok fine, Jekyll 2. Clean up our test matrix. Get our scripts in order. SCSS converter: expand @config["source"] to be "safer".
Addresses a potential issue from #50.
/cc @jekyll/gh-pages