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

Update to use the Dart Sass binary and the new v2 protocol #17

Merged
merged 2 commits into from
Jun 8, 2023

Commits on Jun 8, 2023

  1. Update to use the Dart Sass binary and the new v2 protocol

    E.g. use `sass --embedded`.
    
    Note taht this will bumb to a new major version of this library (v2).
    
    If you need to support the old protocol/binary, use the v1 (root path) version.
    
    It seems to be twice as fast when running in parallel, but slightly slower serialized:
    
    ```bash
    name                             old time/op    new time/op    delta
    Transpiler/SCSS-10                  114µs ± 0%     145µs ± 1%  +26.40%  (p=0.029 n=4+4)
    Transpiler/Start_and_Execute-10    25.6ms ± 2%    26.0ms ± 3%     ~     (p=0.486 n=4+4)
    Transpiler/SCSS_Parallel-10        89.0µs ± 2%    44.4µs ± 3%  -50.12%  (p=0.029 n=4+4)
    
    name                             old alloc/op   new alloc/op   delta
    Transpiler/SCSS-10                 1.33kB ± 1%    1.33kB ± 0%     ~     (p=1.000 n=4+4)
    Transpiler/Start_and_Execute-10    22.4kB ± 1%    22.4kB ± 1%     ~     (p=0.886 n=4+4)
    Transpiler/SCSS_Parallel-10        1.34kB ± 3%    1.33kB ± 1%     ~     (p=1.000 n=4+4)
    
    name                             old allocs/op  new allocs/op  delta
    Transpiler/SCSS-10                   18.0 ± 0%      18.0 ± 0%     ~     (all equal)
    Transpiler/Start_and_Execute-10       144 ± 1%       150 ± 0%   +4.16%  (p=0.029 n=4+4)
    Transpiler/SCSS_Parallel-10          18.0 ± 0%      18.0 ± 0%     ~     (all equal)
    ```
    
    See gohugoio/hugo#11059
    Fixes #15
    bep committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    cdacd4c View commit details
    Browse the repository at this point in the history
  2. Fix import resolver for non-SCSS files

    Fixes #14
    bep committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    e97697d View commit details
    Browse the repository at this point in the history