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

Rewrite SCSS compilation in Bash #31608

Closed
2 tasks
kdmccormick opened this issue Jan 19, 2023 · 2 comments
Closed
2 tasks

Rewrite SCSS compilation in Bash #31608

kdmccormick opened this issue Jan 19, 2023 · 2 comments

Comments

@kdmccormick
Copy link
Member

kdmccormick commented Jan 19, 2023

Background

Part of:

Subtasks

  • Create a sh (not bash) script scripts/assets/compile-sass.sh, re-implementing the functionality of pavelib/assets.py:_compile_sass.
  • Replace the implemention of pavelib/assets.py:_compile_sass with a simple call to the new shell script.

Notes

This is blocked by upgrading to node-sass or dart-sass. That's because, with libsass-python (our current compliation mechanism), there are two ways to compile Sass, and neither are satisfactory:

  • The Python API (sass.compile(..)), which we currently use, cannot not be elegantly called from a shell script. It'd have to be implemented with brittle command along the lines of:
    python -c "import sass; sass.compile(dirname=('$sass_src', '$css_dest'), include_paths=$include_paths, ... )"
    where $include_paths would have to be stitched together, in shell. That all sounds like a step backwards rather than in improvement.
  • The command line interface that comes with the library, sassc does not accept directories as parameters, only individual files. We'd need to implement the logic to compile every file in a directory ourselves.
@kdmccormick
Copy link
Member Author

would be Resolved by #31583

@kdmccormick kdmccormick changed the title Reimplement Sass compilation in sh Rewrite SCSS compilation in Bash Feb 21, 2023
@kdmccormick
Copy link
Member Author

Closed in favor of the parent issue: #31604

@kdmccormick kdmccormick closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2023
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

1 participant