Skip to content

Commit

Permalink
Simplify generation of clone commands, see phetsims/utterance-queue#5
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jan 17, 2020
1 parent 1765131 commit d3d9f86
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions js/grunt/generateREADME.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -47,5 +41,4 @@ module.exports = function( repo, published ) {

// Write to the repository's root directory.
grunt.file.write( `../${repo}/README.md`, readme );
};

};

0 comments on commit d3d9f86

Please sign in to comment.