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

Is it possible to set prefix path for declader one in import statement? #10

Open
robhrt7 opened this issue Jun 26, 2014 · 5 comments
Open

Comments

@robhrt7
Copy link

robhrt7 commented Jun 26, 2014

For example, I have this kind of file:

@import "/res/css/reset.css";
@import "/res/css/base/base.css";

But I want to resole files with path prefix build/grunt, so that files need to be searched in combined path "build/grunt/res/css/reset.css".

@robhrt7
Copy link
Author

robhrt7 commented Jun 26, 2014

I inspected source code, and seems like paths that are passed from paths option, have less priority. What do think about putting specified paths to first priority, so that files would be searched from specified path first, and then in other directories?

@robhrt7
Copy link
Author

robhrt7 commented Jun 26, 2014

And here's a solution for priority changing robhrt7@8b7335b

@suisho
Copy link
Collaborator

suisho commented Jul 1, 2014

My understanding is your environment has ./res/css/reset.css and ./build/grunt/res/css/reset.css and got this bug. correct?

And I checkpaths.unshift('.'); 's reason, I copy lesscss' s old implementation and has not deep reason.

Can you pull reqeust?

@robhrt7
Copy link
Author

robhrt7 commented Jul 1, 2014

Bug came when in my case I had ./res/css/reset.css and ./build/grunt/res/css/reset.css on my file system, but I needed to take only one, that I overriden with options.path.

I could make a pull request, but this patch is needed only for 0.2.0 release, current master is making much more spare work, and processes image urls, that are not needed in grunt-cssjoin.

@suisho suisho mentioned this issue Jul 29, 2014
suisho added a commit that referenced this issue Jul 29, 2014
@suisho suisho reopened this Jul 29, 2014
@suisho
Copy link
Collaborator

suisho commented Jul 29, 2014

i mistake

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

No branches or pull requests

2 participants