gha-utilities / sass-build

GitHub Action JavaScript wrapper runs Sass build with provided Inputs
GNU Affero General Public License v3.0
23 stars 7 forks source link

Fails to create, save, embed, or properly link map files #396

Open Mase3206 opened 2 months ago

Mase3206 commented 2 months ago

Describe the bug

I haven't been able to get this action to:

  1. actually compile a .css.map file
  2. save said file into the artifact or embed it into the compiled CSS
  3. properly link the map in the compiled CSS to the source Sass files.

I have tried:

I even manually checked both the post-compile artifacts and the post-Pages publish artifacts for a map file or embedded map, but none of them had either.

To Reproduce

  1. Take the quick start template and modify the paths and branches it expects to what my repo uses
  2. Integrate it with Pages to deploy after it finishes compiling

Feel free to browse through my commit history for my workflow file: deploy-to-pages.yml

Expected behavior

I would have expected a map file to be generated.

S0AndS0 commented 1 month ago

Thanks for providing a public repo, helps a whole bunch!!!

It seems your configurations are correct and things should work... checking some of the Action logs it looks like at points it may have been attempting to write to non-existent sub-directories, and at some point it also looks like ya forked and fixed things too :-D

Tip for faster debugging; it be possible to test this Action locally, all the options can be defined via shout-casing the keys and prefixing with INPUT_, for example setting the input/output paths within the package.json

-    "test": "node index.js"
+    "test": "INPUT_SOURCE=test/simple.scss INPUT_DESTINATION=/tmp/simple.css node index.js",

... Let me know if ya want to merge in those fixes and I'll happily accept you as a contributor to this project!

Mase3206 commented 1 month ago

That tip for local testing is super helpful, thank you!

I'm still working on my fork. Things went waaaay deeper than expected, and I'm still unable to get the Sass JS API to cooperate. I'm a full time student and my classes just got super busy for a moment, so it will probably be a bit before I can keep digging into it.