File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
tools/pfe-tools/dev-server Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import { join } from 'node:path';
2323const replace = fromRollup ( rollupReplace ) ;
2424
2525type BaseConfig = DevServerConfig & PfeConfig ;
26+
2627export interface PfeDevServerConfigOptions extends BaseConfig {
2728 hostname ?: string ;
2829 litcssOptions ?: LitCSSOptions ;
Original file line number Diff line number Diff line change @@ -37,7 +37,17 @@ async function getDemos(config: PfeDevServerInternalConfig) {
3737 . getTagNames ( )
3838 . flatMap ( tagName =>
3939 manifest . getDemoMetadata ( tagName , config as PfeDevServerInternalConfig )
40- . filter ( demo => demo . filePath ?. includes ( tagName ) ) ) ) ;
40+ . filter ( demo => demo . filePath ?. includes ( tagName ) )
41+ . map ( demo => {
42+ if ( demo . filePath ?. endsWith ( `${ tagName } .html` ) || demo . filePath ?. endsWith ( 'index.html' ) ) {
43+ return {
44+ ...demo ,
45+ permalink : dirname ( demo . permalink ) ,
46+ } ;
47+ } else {
48+ return demo ;
49+ }
50+ } ) ) ) ;
4151}
4252
4353async function getTemplateContent ( demo ?: DemoRecord ) {
You can’t perform that action at this time.
0 commit comments