Skip to content

Commit 65d2b2f

Browse files
committed
Exclude import-only files from Sassdoc
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.
1 parent 674ce9e commit 65d2b2f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"start": "bundle exec middleman server",
77
"postinstall": "npm run build:sassdoc && npm run build:sassdocv5 && npm run build:sassdocv4",
8-
"build:sassdoc": "sassdoc --no-update-notifier --parse node_modules/govuk-frontend/dist/govuk/ > data/sassdoc.json",
8+
"build:sassdoc": "sassdoc --no-update-notifier --parse node_modules/govuk-frontend/dist/govuk/ -c sassdoc.config.json > data/sassdoc.json",
99
"build:sassdocv5": "sassdoc --no-update-notifier --parse node_modules/govuk-frontend-v5/dist/govuk/ > data/sassdoc-v5.json",
1010
"build:sassdocv4": "sassdoc --no-update-notifier --parse node_modules/govuk-frontend-v4/govuk/ > data/sassdoc-v4.json",
1111
"lint": "standard",

sassdoc.config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"exclude": ["**/*.import.scss"]
3+
}

0 commit comments

Comments
 (0)