From ff9589bef11c4fca4b7ad0557eef7070ebce9521 Mon Sep 17 00:00:00 2001 From: samreid Date: Fri, 17 Jan 2020 07:12:33 -0700 Subject: [PATCH] Invert logic for isSimPublished, see https://github.com/phetsims/utterance-queue/issues/5 --- js/SimVersion.js | 8 ++++++++ js/grunt/Gruntfile.js | 9 ++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index c7c3cb76c..e371e2e5f 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -125,6 +125,14 @@ const assert = typeof module !== 'undefined' ? require( 'assert' ) : window && w this.testType ); } + /** + * @returns {boolean} + * @public + */ + get isSimPublished() { + return !this.isSimNotPublished; + } + /** * Takes a serialized form of the SimVersion and returns an actual instance. * @public diff --git a/js/grunt/Gruntfile.js b/js/grunt/Gruntfile.js index 798941065..01cba87a8 100644 --- a/js/grunt/Gruntfile.js +++ b/js/grunt/Gruntfile.js @@ -328,15 +328,10 @@ module.exports = function( grunt ) { grunt.task.run( 'generate-test-config' ); } - // update readmes only for simulations + // update README.md only for simulations if ( packageObject.phet.simulation ) { const simVersion = SimVersion.parse( packageObject.version ); - if ( simVersion.isSimNotPublished ) { - generateREADME( repo, false /* not published */ ); - } - else { - generateREADME( repo, true /* published */ ); - } + generateREADME( repo, simVersion.isSimPublished ); } } ) );