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

build: compile/watch sass with new npm scripts #34318

Merged
merged 3 commits into from
Apr 4, 2024

Commits on Apr 4, 2024

  1. fix: simplify npm run watch-sass so that it is more reliable

    The implementation of `npm run watch-sass` was trying really hard
    to recompile precisely only the Sass that needed to be recompiled, but in
    order to do so, it had to spin up several `watchmedo` processes
    per theme. These processes would trigger one another sometimes, leading
    to infinite recompilation loops.
    
    Rather than figure out all the dependency directions and messing with
    `watchmedo`, I've opted to simplify the script to invoke a single
    `watchmedo` process per theme. A single theme recompiles within
    seconds, so I think this is a good compromise, one which makes the
    script easier to reason about will help me move pass this legacy
    assets work.
    kdmccormick committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    966f2dc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e33302b View commit details
    Browse the repository at this point in the history
  3. build: compile/watch sass with new npm scripts

    `paver` commands are deprecated for managing static assets. Starting in
    Sumac, only `npm run` commands will be supported for managing static
    assets.
    
    To ease the transition, both `paver` and `npm run` commands will work in
    Redwood. However, we want to stop using the *implementations* of the
    `paver` asset commands right now, as they are blocking the Python 3.11
    upgrade. This will also make the removal of `paver` commands more
    straightforward come Sumac.
    
    So, this commit turns these commands/functions:
    * paver compile_sass (used by configuration)
    * paver watch_sass (used by configuration and devstack)
    * pavelib/assets.py:_compile_sass (used by Tutor)
    
    into very thin wrappers around the new `npm run` commands. Each of these
    paver routines now raise a loud deprecation warning, including a message
    of the `npm run` command that the operator can switch to.
    We expect no impact to site operators or end users.
    
    openedx#31895
    kdmccormick committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    a228b81 View commit details
    Browse the repository at this point in the history