Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

track deeper levels of import #3

Closed
claudiomedina opened this issue Aug 7, 2015 · 12 comments · Fixed by #7
Closed

track deeper levels of import #3

claudiomedina opened this issue Aug 7, 2015 · 12 comments · Fixed by #7

Comments

@claudiomedina
Copy link

hey @berstend,
Nice work!
Currently it can only get one level om @import. Can this be improved to catch deeper levels of @import.
For example

a.scss

@import 'b';

b.scss

@import 'c';

c.scss

//some SCSS

if I change a.scss or b.scss it passes the filter and compiles a.scss. But if I make any change to c.scss it wont pass the filter block and wont compile a.scss.

did I make myself clear?

@alex-shamshurin
Copy link

I have the same problem, this plugin does not include third level of import and also it does'n work with watch,

@webcultist
Copy link

Well, depending on the depth, you try to archive, you could pipe the command multiple times in row.

Looked like this in my code:
.pipe(sassInheritance({dir: paths.sass, debug: true}))
.pipe(sassInheritance({dir: paths.sass, debug: true}))
.pipe(sassInheritance({dir: paths.sass, debug: true}))

Problem is, it becomes significantly slower with every pipe and depending on your file structure it will be faster to compile everything than to resolve the dependencies.
Interestingly, the command line command line command of the used library can easily return all descendants of a file. The API Bridge seems to can not.

@alex-shamshurin
Copy link

Can we resolve dependencies once and keep them in cache and rebuild it when
only needed? Why we must do it every time?

And btw I could not make this plugin work with watch.
06 нояб. 2015 г. 3:10 пользователь "Eugen Kraft" notifications@github.com
написал:

Well, depending on the depth, you try to archive, you could pipe the
command multiple times in row.

Looked like this in my code:
.pipe(sassInheritance({dir: paths.sass, debug: true}))
.pipe(sassInheritance({dir: paths.sass, debug: true}))
.pipe(sassInheritance({dir: paths.sass, debug: true}))

Problem is, it becomes significantly slower with every pipe and depending
on your file structure it will be faster to compile everything than to
resolve the dependencies.
Interestingly, the command line command line command of the used library
can easily return all descendants of a file. The API Bridge seems to can
not.


Reply to this email directly or view it on GitHub
#3 (comment)
.

@webcultist
Copy link

Don't misunderstand me, there are several ways to fix this and for sure way more effective ways to handle this than my posted solution. It was just a quickfix hat should show that it's definitely doable. I want to take a deeper look in the code, but had unfortunately no time.
You could also take al look in the current forks, as there are a few interesting changes.

As I'm no good backend developer, I'm not sure if I can find a solution very fast, but I'm sure an experienced developer should be able to handle this in 1 - 3 hours.

@safareli
Copy link

before #7 will be merged and published you can use my fork where i fixed that issue.

$ npm i git://github.com/safareli/gulp-sass-inheritance.git#patch-1

@webcultist
Copy link

Awesome! Thank you so much for this - works like a charm!

@safareli
Copy link

Welcome :3

@kevin-smets
Copy link

Thx @safareli ! Just discovered this here, so the patch version is a lifesaver :).

@alex-shamshurin
Copy link

Has this patch been applied already to master?

@alex-shamshurin
Copy link

Does this https://www.npmjs.com/package/custom-gulp-sass-inheritance solve the issue?

@berstend
Copy link
Owner

@claudiomedina @alex-shamshurin @webcultist @kevin-smets Sorry everyone!

I was totally swamped with work and didn't pay attention to the GH notifications.
I come bearing gifts tests! 😅

Thanks a lot for the patch @safareli - I've incorporated your fixes among others in a fresh v1.1.0 release that has also been published on NPM.

I make sure to be more active on PRs from now on. Thanks!

@ianbrandt
Copy link

I missed subscribing to this issue, so I'm just now upgrading from safareli's fork to v1.1.0. Works great. Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants