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

Preprocess rails assets imported via absolute path #136

Open
wants to merge 1 commit into
base: master
from

Conversation

@bodnarbm
Copy link

commented Oct 5, 2019

If a processed file used an absolute path without an extension to import an asset that would normally require preprocessing via the sassc-rails gem (such as assets using ERB templates or .css.s[a|c]ss files, these files would fail to process with a file not found error.

This change checks if the directory component of the import path is a valid directory. If so, that directory is added to the list of paths to search for files with extensions requiring preprocessing, and preprocesses those files before handing them off to the native sassc library.

Addresses #123 first issue

@bodnarbm bodnarbm force-pushed the bodnarbm:fix-absolute-path-imports-for-rails-assets branch 2 times, most recently from b5ebd55 to a089c7e Oct 5, 2019
If a processed file used an absolute path without an extension to import an
asset that would normally require preprocessing via the sassc-rails gem (such
as assets using ERB templates or `.css.s[a|c]ss` files, these files would fail
to process with a file not found error.

This change checks if the directory component of the import path is a valid
directory. If so, that directory is added to the list of paths to search for
files with extensions requiring preprocessing, and preprocesses those files
before handing them off to the native sassc library.
@bodnarbm bodnarbm force-pushed the bodnarbm:fix-absolute-path-imports-for-rails-assets branch from a089c7e to 52bbf6d Oct 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.