Exclude import-only files from Sassdoc#616
Merged
Merged
Conversation
✅ Deploy Preview for govuk-frontend-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
romaricpascal
commented
Apr 24, 2026
| "start": "bundle exec middleman server", | ||
| "postinstall": "npm run build:sassdoc && npm run build:sassdocv5 && npm run build:sassdocv4", | ||
| "build:sassdoc": "sassdoc --no-update-notifier --parse node_modules/govuk-frontend/dist/govuk/ > data/sassdoc.json", | ||
| "build:sassdoc": "sassdoc --no-update-notifier --parse node_modules/govuk-frontend/dist/govuk/ -c sassdoc.config.json > data/sassdoc.json", |
Member
Author
There was a problem hiding this comment.
note Only the v6 sassdoc needs to exclude the import only files, so I've only added the configuration there. Happy to extend it to the rest of the build:sassdoc commands if we prefer consistency.
36degrees
reviewed
Apr 24, 2026
Contributor
36degrees
left a comment
There was a problem hiding this comment.
Wondering if it'd be worth:
- moving
no-update-notifierinto the config file, so we pass all the non input/output config the same way - updating all the
build:sassdoc*scripts to use the config – this'd mean v4 and v5 would also exclude import-only files, but there shouldn't be any, so that's OK?
1 task
65d2b2f to
8b512e6
Compare
v6.2.0 adds import only files in GOV.UK Frontend, some of which have duplicate the Sass documentation from their corresponding Sass module. To avoid duplicating entries in the Sass API, we use a `sassdoc.config.json` file to exclude the `.import.scss` file. Unfortunately, there's [no flag for Sassdoc's CLI to exclude files](http://sassdoc.com/getting-started/#options) and working out a glob pattern would make things a little cryptic.
8b512e6 to
23762b8
Compare
36degrees
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v6.2.0 adds import only files in GOV.UK Frontend, some of which have duplicate the Sass documentation from their corresponding Sass module. To avoid duplicating entries in the Sass API, we use a
sassdoc.config.jsonfile to exclude the.import.scssfile.Unfortunately, there's no flag for Sassdoc's CLI to exclude files and working out a glob pattern would make things a little cryptic.