From 7a4c4347150067dab65a3a4fd012c83b8a7e0df9 Mon Sep 17 00:00:00 2001 From: Charlie Mahoney Date: Tue, 10 Dec 2024 15:55:38 -0500 Subject: [PATCH] Rename setting to sassDeprecationWarnings and update logic to be more human readable --- README.md | 2 +- gulpfile.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ae42053..a969db7 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ Use path settings to customize where USWDS Compile looks for USWDS source and ou | `sprite.projectIconsOnly` | `false` | Include _only_ the icons in `paths.src.projectIcons` in the icon sprite. | | `settings.compile.browserslist` | `["> 2%", "last 2 versions", "IE 11", "not dead"]` | Define the [browserslist query](https://github.com/browserslist/browserslist?tab=readme-ov-file#queries) for CSS prefixes generated by [autoprefixer](https://github.com/postcss/autoprefixer). | | `settings.compile.sassSourcemaps` | `true` | Include sourcemap when compiling SASS to CSS. | -| `settings.compile.quietSassDeps` | `true` | Silence USWDS Sass deprecation warnings. This will not silence deprecation warnings for project Sass. | +| `settings.compile.sassDeprecationWarnings` | `false` | Show USWDS Sass deprecation warnings. When set to `true`, Sass will output deprecation warnings for USWDS code in the terminal during compilation. Deprecation warnings for non-USWDS Sass will output even when this value is set to `false`. | ### Functions diff --git a/gulpfile.js b/gulpfile.js index 4d45d1a..577bf93 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -66,7 +66,7 @@ let settings = { }, browserslist: ["> 2%", "last 2 versions", "IE 11", "not dead"], sassSourcemaps: true, - quietSassDeps: true + sassDeprecationWarnings: false }, sprite: { width: 24, @@ -199,7 +199,7 @@ function buildSass() { sass({ outputStyle: "compressed", includePaths: buildSettings.includes, - quietDeps: settings.compile.quietSassDeps, + quietDeps: !settings.compile.sassDeprecationWarnings, }).on("error", handleError) ) .pipe(replace(/\buswds @version\b/g, `based on uswds v${pkg}`))