File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
showcases/patternhub/scripts Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 11import FS from 'node:fs' ;
22import { getComponentName } from './utils.js' ;
33
4+ // If you want to hide components from the test table, add it to the unlistedComponents array.
5+ const unlistedComponents = new Set ( [
6+ 'page' ,
7+ 'custom-select-form-field' ,
8+ 'custom-select-dropdown'
9+ ] ) ;
10+ const unlistedSubComponentsPrefixes = new Set ( [ '-list' , '-panel' , '-item' ] ) ;
11+
412const webTypesPath = './../../output/stencil/dist/web-types.json' ;
513
614const generateTestTable = ( ) => {
@@ -22,14 +30,10 @@ const generateTestTable = () => {
2230 for ( const { name } of elements ) {
2331 const componentName = getComponentName ( name ) ;
2432 if (
25- [
26- 'page' ,
27- 'custom-select-form-field' ,
28- 'custom-select-dropdown'
29- ] . includes ( componentName ) ||
30- componentName . endsWith ( '-list' ) ||
31- componentName . endsWith ( '-panel' ) ||
32- componentName . endsWith ( '-item' )
33+ unlistedComponents . has ( componentName ) ||
34+ [ ...unlistedSubComponentsPrefixes ] . some ( ( suffix ) =>
35+ componentName . endsWith ( suffix )
36+ )
3337 ) {
3438 // We don't want to add something like accordion-item
3539 continue ;
You can’t perform that action at this time.
0 commit comments