markstory / mini-asset

A simple set of asset build tools that provides a config file and extensible integrations with pre-processors & minifiers.
MIT License
64 stars 17 forks source link

Add paths to ScssPHP import paths #55

Closed berarma closed 4 years ago

berarma commented 4 years ago

I need the paths in the configuration to be imported in ScssPHP so I can use the CSS framework files from my project. The current implementation adds just the path the current file is in, but I'm not directly loading the CSS framework in asset_compress, instead I'm importing them in my scss files.

codecov-io commented 4 years ago

Codecov Report

Merging #55 into master will decrease coverage by 0.11%. The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #55      +/-   ##
============================================
- Coverage     73.16%   73.04%   -0.12%     
- Complexity      445      446       +1     
============================================
  Files            50       50              
  Lines          1226     1228       +2     
============================================
  Hits            897      897              
- Misses          329      331       +2     
Impacted Files Coverage Δ Complexity Δ
src/Filter/ScssPHP.php 0.00% <0.00%> (ø) 4.00 <0.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6f72b70...7cb7ad9. Read the comment docs.

codecov-commenter commented 4 years ago

Codecov Report

Merging #55 into master will decrease coverage by 0.11%. The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #55      +/-   ##
============================================
- Coverage     73.16%   73.04%   -0.12%     
- Complexity      445      446       +1     
============================================
  Files            50       50              
  Lines          1226     1228       +2     
============================================
  Hits            897      897              
- Misses          329      331       +2     
Impacted Files Coverage Δ Complexity Δ
src/Filter/ScssPHP.php 0.00% <0.00%> (ø) 4.00 <0.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6f72b70...ac23614. Read the comment docs.

berarma commented 4 years ago

I've just noticed that dependencies won't get correctly resolved when using import paths. The getDependencies method should use the import paths to search for dependencies.

markstory commented 4 years ago

Thanks :clap:

berarma commented 4 years ago

It's missing the overloading of the getDependencies method so that it uses the import paths. I was waiting for #59 to be accepted. I'll create a new PR.

berarma commented 4 years ago

In ScssFilter the setting is called imports while in ScssPHP is called paths. I overlooked this difference. I could change it to imports in the new PR to avoid this inconsistency. Do you agree?

markstory commented 4 years ago

@berama that sounds like a good idea to me.