From 54c1dbf24c36b73599e58b4e4d71712f2b3e14a3 Mon Sep 17 00:00:00 2001 From: zepumph Date: Thu, 17 Feb 2022 14:58:27 -0700 Subject: [PATCH] consisten guide naming, https://github.com/phetsims/studio/issues/250 --- js/grunt/copySupplementalPhetioFiles.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/js/grunt/copySupplementalPhetioFiles.js b/js/grunt/copySupplementalPhetioFiles.js index 69beaffa8..56c1b2288 100644 --- a/js/grunt/copySupplementalPhetioFiles.js +++ b/js/grunt/copySupplementalPhetioFiles.js @@ -494,20 +494,18 @@ const handleClientGuides = ( repoName, simulationDisplayName, buildDir ) => { } // handle generating and writing the html file for each client guide - generateAndWriteClientGuide( repoName, simulationDisplayName, PHET_IO_GUIDE_FILENAME, `${clientGuidesSourceRoot}${PHET_IO_GUIDE_FILENAME}.md`, `${builtClientGuidesOutputDir}${PHET_IO_GUIDE_FILENAME}.html` ); - generateAndWriteClientGuide( repoName, simulationDisplayName, EXAMPLES_FILENAME, `${clientGuidesSourceRoot}${EXAMPLES_FILENAME}.md`, `${builtClientGuidesOutputDir}${EXAMPLES_FILENAME}.html` ); - generateAndWriteClientGuide( repoName, simulationDisplayName, PHET_IO_MIGRATION_GUIDE_FILENAME, `${clientGuidesSourceRoot}${PHET_IO_MIGRATION_GUIDE_FILENAME}.md`, `${builtClientGuidesOutputDir}${PHET_IO_MIGRATION_GUIDE_FILENAME}.html` ); + generateAndWriteClientGuide( repoName, `${simulationDisplayName} PhET-iO Guide`, `${clientGuidesSourceRoot}${PHET_IO_GUIDE_FILENAME}.md`, `${builtClientGuidesOutputDir}${PHET_IO_GUIDE_FILENAME}.html` ); + generateAndWriteClientGuide( repoName, `${simulationDisplayName} Examples`, `${clientGuidesSourceRoot}${EXAMPLES_FILENAME}.md`, `${builtClientGuidesOutputDir}${EXAMPLES_FILENAME}.html` ); + generateAndWriteClientGuide( repoName, `${simulationDisplayName} Migration Guide`, `${clientGuidesSourceRoot}${PHET_IO_MIGRATION_GUIDE_FILENAME}.md`, `${builtClientGuidesOutputDir}${PHET_IO_MIGRATION_GUIDE_FILENAME}.html` ); }; /** * Takes a markdown client guides, fills in the links, and then generates and writes it as html * @param {string} repoName - * @param {string} simulationDisplayName - * @param {string} contentFileNameNoSuffix * @param {string} mdFilePath - to get the source md file * @param {string} destinationPath - to write to */ -const generateAndWriteClientGuide = ( repoName, simulationDisplayName, contentFileNameNoSuffix, mdFilePath, destinationPath ) => { +const generateAndWriteClientGuide = ( repoName, title, mdFilePath, destinationPath ) => { // make sure the source markdown file exists if ( !fs.existsSync( mdFilePath ) ) { @@ -530,7 +528,7 @@ const generateAndWriteClientGuide = ( repoName, simulationDisplayName, contentFi // link a stylesheet const clientGuideHTML = ` - ${simulationDisplayName}: ${contentFileNameNoSuffix} + ${title}