uswds / uswds-compile

Simple Gulp 5 functions for copying USWDS static assets and transforming USWDS Sass into browser-readable CSS.
Other
20 stars 12 forks source link

Use Sass Embedded for improved performance #13

Closed thisisdano closed 2 years ago

thisisdano commented 2 years ago

Improve compile speed. Replaces the sass package with the sass-embedded package to improve compile performance by about 40-50%.

Sass embedded:

This package is an alternative to the sass package. It supports the same JS API as sass and is maintained by the same team, but where the sass package is pure JavaScript, sass-embedded is instead a JavaScript wrapper around a native Dart executable. This means sass-embedded will generally be much faster especially for large Sass compilations, but it can only be installed on the platforms that Dart supports: Windows, Mac OS, and Linux.

Despite being different packages, both sass and sass-embedded are considered "Dart Sass" since they have the same underlying implementation. Since the first stable release of the sass-embedded package, both packages are released at the same time and share the same version number.

https://www.npmjs.com/package/sass-embedded https://github.com/sass/embedded-host-node