@@ -65,6 +65,20 @@ const resources = [
65
65
66
66
const documentationGlobbyPattern = `${ constants . dirs . NODE_MODULES } /{hint,vscode-webhint,@hint/{${ resources . join ( ',' ) } }-*}` ;
67
67
68
+ /**
69
+ * Filters files for packages we do not want to show up in the website.
70
+ * @param {string[] } files The files to filter out
71
+ */
72
+ const filterPackages = ( files ) => {
73
+ const ignoredPackages = [ 'configuration-all' ] ;
74
+
75
+ return files . filter ( ( file ) => {
76
+ return ! ignoredPackages . some ( ( pkgToIgnore ) => {
77
+ return file . includes ( pkgToIgnore ) ;
78
+ } ) ;
79
+ } ) ;
80
+ } ;
81
+
68
82
const trimAndUnquote = ( string ) => {
69
83
return string . trim ( ) . replace ( / ^ " | " $ / , '' ) ;
70
84
} ;
@@ -171,14 +185,16 @@ const getResourcesFiles = async () => {
171
185
const imageFiles = [ ] ;
172
186
173
187
for ( const resource of resources ) {
174
- const images = await globby ( [ `${ documentationGlobbyPattern } /images/**/*` ] , { absolute : true } ) ;
188
+ const allImages = await globby ( [ `${ documentationGlobbyPattern } /images/**/*` ] , { absolute : true } ) ;
189
+ const images = filterPackages ( allImages ) ;
175
190
176
191
images . forEach ( ( image ) => {
177
192
imageFiles . push ( getImageItemFromResource ( image , resource ) ) ;
178
193
} ) ;
179
194
}
180
195
181
- const docs = await globby ( [ `${ documentationGlobbyPattern } /{README.md,docs/*.md}` ] , { absolute : true } ) ;
196
+ const allDocs = await globby ( [ `${ documentationGlobbyPattern } /{README.md,docs/*.md}` ] , { absolute : true } ) ;
197
+ const docs = filterPackages ( allDocs ) ;
182
198
183
199
const promises = docs . map ( async ( doc ) => {
184
200
const { content, frontMatter } = await getExistingContent ( doc ) ;
@@ -728,9 +744,10 @@ const createHintCategories = (files) => {
728
744
729
745
const updateChangelog = async ( ) => {
730
746
/** All packages should be hoisted so no need to look inside `configuration-all` */
731
- const files = await globby ( [ `${ documentationGlobbyPattern } /CHANGELOG.md` ] ) ;
747
+ const allChangelogs = await globby ( [ `${ documentationGlobbyPattern } /CHANGELOG.md` ] ) ;
748
+ const changelogs = filterPackages ( allChangelogs ) ;
732
749
733
- const changelog = await files . reduce ( async ( totalPromise , file ) => {
750
+ const changelog = await changelogs . reduce ( async ( totalPromise , file ) => {
734
751
const total = await totalPromise ;
735
752
const content = await readFile ( file , 'utf8' ) ;
736
753
let packageName = file . split ( '/' ) . slice ( - 2 , - 1 ) [ 0 ] ;
0 commit comments