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

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

Open
Mase3206 opened this issue Oct 3, 2024 · 2 comments
Open

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

Mase3206 opened this issue Oct 3, 2024 · 2 comments

Comments

@Mase3206
Copy link

Mase3206 commented Oct 3, 2024

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:

  • setting sourceMap to the desired map file path - seemingly no map is generated
  • setting sourceMap to true and outFile to the desired map file output - no output, but it did attempt to update the link in the compiled CSS
  • setting omitSourceMapUrl to false - didn't seem to do anything
  • setting both sourceMap and sourceMapEmbed to true - it did not embed the map

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.

@Mase3206 Mase3206 changed the title Fails to save, embed, or properly link map files Fails to create, save, embed, or properly link map files Oct 3, 2024
@S0AndS0
Copy link
Member

S0AndS0 commented Oct 8, 2024

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
Copy link
Author

Mase3206 commented Oct 11, 2024

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.

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