File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
template/src/content/tutorial/1-basics/1-introduction/1-welcome Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ export async function getTutorial(): Promise<Tutorial> {
264264 continue ;
265265 }
266266
267- if ( micromatch . isMatch ( filename , lesson . data . template . visibleFiles , { format : formatTemplateFile } ) ) {
267+ if ( micromatch . isMatch ( filename , lesson . data . template . visibleFiles , { basename : true } ) ) {
268268 lesson . files [ 1 ] . push ( filename ) ;
269269 }
270270 }
@@ -340,15 +340,6 @@ function getSlug(entry: CollectionEntryTutorial) {
340340 return slug ;
341341}
342342
343- function formatTemplateFile ( filename : string ) {
344- // compare files without leading "/" so that patterns like ["src/index.js"] match "/src/index.js"
345- if ( filename . startsWith ( '/' ) ) {
346- return filename . substring ( 1 ) ;
347- }
348-
349- return filename ;
350- }
351-
352343interface CollectionEntryTutorial {
353344 id : string ;
354345 slug : string ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ terminal:
1313 panels : ['terminal', 'output']
1414template :
1515 name : default
16- visibleFiles : ['src/ template-only-file.js']
16+ visibleFiles : ['template-only-file.js']
1717---
1818
1919# Kitchen Sink [ Heading 1]
You can’t perform that action at this time.
0 commit comments