@@ -95,7 +95,7 @@ async function buildVersionMenu(versions, currentVersion) {
9595async function build ( ) {
9696 const template = await fs . readFile ( templatePath , 'utf-8' ) ;
9797 let docsMenu = '' ;
98- let sandbox = await fs . readFile ( `${ templatesDir } sandbox .html` , 'utf-8' ) ;
98+ let playground = await fs . readFile ( `${ templatesDir } playground .html` , 'utf-8' ) ;
9999 let htmlFileName = '' ;
100100
101101 const marked = new Marked ( ) ;
@@ -178,19 +178,19 @@ async function build() {
178178 }
179179
180180 versionsMenu = await buildVersionMenu ( uniqueVersions , defaultVersion ) ;
181- sandbox = sandbox . replace ( '{base}' , `${ base } ` ) ;
182- sandbox = sandbox . replaceAll ( '{docs-version}' , '' ) ;
183- sandbox = sandbox . replace ( '{versions-menu}' , `${ versionsMenu } ` ) ;
184- sandbox = sandbox . replaceAll ( '{current-version}' , version ) ;
181+ playground = playground . replace ( '{base}' , `${ base } ` ) ;
182+ playground = playground . replaceAll ( '{docs-version}' , '' ) ;
183+ playground = playground . replace ( '{versions-menu}' , `${ versionsMenu } ` ) ;
184+ playground = playground . replaceAll ( '{current-version}' , version ) ;
185185 if ( branch ) {
186- sandbox = sandbox . replaceAll ( '{default-version}' , '.' ) ;
186+ playground = playground . replaceAll ( '{default-version}' , '.' ) ;
187187 } else {
188- sandbox = sandbox . replaceAll ( '{default-version}' , defaultVersion ) ;
188+ playground = playground . replaceAll ( '{default-version}' , defaultVersion ) ;
189189 }
190- const sandboxFilePath = path . join ( resultDir , 'sandbox .html' ) ;
191- await fs . mkdir ( path . dirname ( sandboxFilePath ) , { recursive : true } ) ;
192- await fs . writeFile ( sandboxFilePath , sandbox , 'utf-8' ) ;
193- echo ( chalk . green ( `File created: ${ sandboxFilePath } ` ) ) ;
190+ const playgroundFilePath = path . join ( resultDir , 'playground .html' ) ;
191+ await fs . mkdir ( path . dirname ( playgroundFilePath ) , { recursive : true } ) ;
192+ await fs . writeFile ( playgroundFilePath , playground , 'utf-8' ) ;
193+ echo ( chalk . green ( `File created: ${ playgroundFilePath } ` ) ) ;
194194}
195195
196196async function getVersionTags ( ) {
0 commit comments