Skip to content

Commit

Permalink
Merge pull request #131 from uswds/cm-quietDeps-setting
Browse files Browse the repository at this point in the history
USWDS-Compile - Sass: Create quiet deprecations setting
  • Loading branch information
thisisdano authored Dec 18, 2024
2 parents ab13b8b + 824a8e1 commit 7b88d94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 306 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ Use path settings to customize where USWDS Compile looks for USWDS source and ou
| Setting | Default | Description |
| --------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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.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.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

Expand Down
3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ let settings = {
},
browserslist: ["> 2%", "last 2 versions", "IE 11", "not dead"],
sassSourcemaps: true,
sassDeprecationWarnings: false
},
sprite: {
width: 24,
Expand Down Expand Up @@ -198,7 +199,7 @@ function buildSass() {
sass({
outputStyle: "compressed",
includePaths: buildSettings.includes,
silenceDeprecations: ["mixed-decls"]
quietDeps: !settings.compile.sassDeprecationWarnings,
}).on("error", handleError)
)
.pipe(replace(/\buswds @version\b/g, `based on uswds v${pkg}`))
Expand Down
304 changes: 0 additions & 304 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7b88d94

Please sign in to comment.