diff --git a/js/grunt/generateREADME.js b/js/grunt/generateREADME.js index 582f75e91..b954ff322 100644 --- a/js/grunt/generateREADME.js +++ b/js/grunt/generateREADME.js @@ -28,13 +28,7 @@ module.exports = function( repo, published ) { const phetLibs = getPhetLibs( repo, 'phet' ); // Commands for cloning all required repositories - let cloneCommands = ''; - for ( let i = 0; i < phetLibs.length; i++ ) { - cloneCommands = cloneCommands + 'git clone https://github.com/phetsims/' + phetLibs[ i ] + '.git'; - if ( i !== phetLibs.length - 1 ) { - cloneCommands += '\n'; - } - } + const cloneCommands = phetLibs.map( phetLib => `git clone https://github.com/phetsims/${phetLib}.git` ).join( '\n' ); // Read the template. const templateFile = published ? 'README-published.md' : 'README-unpublished.md'; @@ -47,5 +41,4 @@ module.exports = function( repo, published ) { // Write to the repository's root directory. grunt.file.write( `../${repo}/README.md`, readme ); -}; - +}; \ No newline at end of file