Skip to content

Commit

Permalink
var -> const in require statements, use arrow function in define requ…
Browse files Browse the repository at this point in the history
…ire call, phetsims/tasks#1010
  • Loading branch information
zepumph committed Sep 19, 2019
1 parent 25b0b82 commit e3bddbf
Show file tree
Hide file tree
Showing 20 changed files with 225 additions and 225 deletions.
26 changes: 13 additions & 13 deletions js/AllLevelsCompletedNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
/**
* model dialog shown when all levels have been completed
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var FaceNode = require( 'SCENERY_PHET/FaceNode' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var Panel = require( 'SUN/Panel' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );
var RichText = require( 'SCENERY/nodes/RichText' );
var Text = require( 'SCENERY/nodes/Text' );
var VBox = require( 'SCENERY/nodes/VBox' );
var vegas = require( 'VEGAS/vegas' );
const FaceNode = require( 'SCENERY_PHET/FaceNode' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const Panel = require( 'SUN/Panel' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );
const RichText = require( 'SCENERY/nodes/RichText' );
const Text = require( 'SCENERY/nodes/Text' );
const VBox = require( 'SCENERY/nodes/VBox' );
const vegas = require( 'VEGAS/vegas' );

// constants
var FACE_DIAMETER = 160; // empirically determined

// strings
var doneString = require( 'string!VEGAS/done' );
var youCompletedAllLevelsString = require( 'string!VEGAS/youCompletedAllLevels' );
const doneString = require( 'string!VEGAS/done' );
const youCompletedAllLevelsString = require( 'string!VEGAS/youCompletedAllLevels' );

/**
* @param {Function} listener - function that gets called when 'next' button is pressed
Expand Down
16 changes: 8 additions & 8 deletions js/ElapsedTimeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var GameTimer = require( 'VEGAS/GameTimer' );
var HBox = require( 'SCENERY/nodes/HBox' );
var inherit = require( 'PHET_CORE/inherit' );
var SimpleClockIcon = require( 'SCENERY_PHET/SimpleClockIcon' );
var StatusBar = require( 'VEGAS/StatusBar' );
var Text = require( 'SCENERY/nodes/Text' );
var vegas = require( 'VEGAS/vegas' );
const GameTimer = require( 'VEGAS/GameTimer' );
const HBox = require( 'SCENERY/nodes/HBox' );
const inherit = require( 'PHET_CORE/inherit' );
const SimpleClockIcon = require( 'SCENERY_PHET/SimpleClockIcon' );
const StatusBar = require( 'VEGAS/StatusBar' );
const Text = require( 'SCENERY/nodes/Text' );
const vegas = require( 'VEGAS/vegas' );

/**
* @param {Property.<number>} elapsedTimeProperty
Expand Down
32 changes: 16 additions & 16 deletions js/FiniteStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ElapsedTimeNode = require( 'VEGAS/ElapsedTimeNode' );
var HBox = require( 'SCENERY/nodes/HBox' );
var inherit = require( 'PHET_CORE/inherit' );
var PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
var ScoreDisplayLabeledNumber = require( 'VEGAS/ScoreDisplayLabeledNumber' );
var ScoreDisplayLabeledStars = require( 'VEGAS/ScoreDisplayLabeledStars' );
var StatusBar = require( 'VEGAS/StatusBar' );
var StringUtils = require( 'PHETCOMMON/util/StringUtils' );
var Tandem = require( 'TANDEM/Tandem' );
var Text = require( 'SCENERY/nodes/Text' );
var TextPushButton = require( 'SUN/buttons/TextPushButton' );
var vegas = require( 'VEGAS/vegas' );
const ElapsedTimeNode = require( 'VEGAS/ElapsedTimeNode' );
const HBox = require( 'SCENERY/nodes/HBox' );
const inherit = require( 'PHET_CORE/inherit' );
const PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
const ScoreDisplayLabeledNumber = require( 'VEGAS/ScoreDisplayLabeledNumber' );
const ScoreDisplayLabeledStars = require( 'VEGAS/ScoreDisplayLabeledStars' );
const StatusBar = require( 'VEGAS/StatusBar' );
const StringUtils = require( 'PHETCOMMON/util/StringUtils' );
const Tandem = require( 'TANDEM/Tandem' );
const Text = require( 'SCENERY/nodes/Text' );
const TextPushButton = require( 'SUN/buttons/TextPushButton' );
const vegas = require( 'VEGAS/vegas' );

// strings
var labelLevelString = require( 'string!VEGAS/label.level' );
var pattern0Challenge1MaxString = require( 'string!VEGAS/pattern.0challenge.1max' );
var startOverString = require( 'string!VEGAS/startOver' );
const labelLevelString = require( 'string!VEGAS/label.level' );
const pattern0Challenge1MaxString = require( 'string!VEGAS/pattern.0challenge.1max' );
const startOverString = require( 'string!VEGAS/startOver' );

// constants
var VALID_SCORE_DISPLAY_CONSTRUCTORS = [
Expand Down
16 changes: 8 additions & 8 deletions js/GameTimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var Property = require( 'AXON/Property' );
var StringUtils = require( 'PHETCOMMON/util/StringUtils' );
var timer = require( 'AXON/timer' );
var vegas = require( 'VEGAS/vegas' );
const inherit = require( 'PHET_CORE/inherit' );
const Property = require( 'AXON/Property' );
const StringUtils = require( 'PHETCOMMON/util/StringUtils' );
const timer = require( 'AXON/timer' );
const vegas = require( 'VEGAS/vegas' );

// strings
var pattern0Hours1Minutes2SecondsString = require( 'string!VEGAS/pattern.0hours.1minutes.2seconds' );
var pattern0Minutes1SecondsString = require( 'string!VEGAS/pattern.0minutes.1seconds' );
const pattern0Hours1Minutes2SecondsString = require( 'string!VEGAS/pattern.0hours.1minutes.2seconds' );
const pattern0Minutes1SecondsString = require( 'string!VEGAS/pattern.0minutes.1seconds' );

/**
* @constructor
Expand Down
18 changes: 9 additions & 9 deletions js/InfiniteStatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
* @author Andrea Lin
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BackButton = require( 'SCENERY_PHET/buttons/BackButton' );
var HBox = require( 'SCENERY/nodes/HBox' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var ScoreDisplayLabeledNumber = require( 'VEGAS/ScoreDisplayLabeledNumber' );
var ScoreDisplayNumberAndStar = require( 'VEGAS/ScoreDisplayNumberAndStar' );
var StatusBar = require( 'VEGAS/StatusBar' );
var vegas = require( 'VEGAS/vegas' );
const BackButton = require( 'SCENERY_PHET/buttons/BackButton' );
const HBox = require( 'SCENERY/nodes/HBox' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const ScoreDisplayLabeledNumber = require( 'VEGAS/ScoreDisplayLabeledNumber' );
const ScoreDisplayNumberAndStar = require( 'VEGAS/ScoreDisplayNumberAndStar' );
const StatusBar = require( 'VEGAS/StatusBar' );
const vegas = require( 'VEGAS/vegas' );

// constants
var VALID_SCORE_DISPLAY_CONSTRUCTORS = [
Expand Down
50 changes: 25 additions & 25 deletions js/LevelCompletedNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@
* @author John Blanco
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Color = require( 'SCENERY/util/Color' );
var GameTimer = require( 'VEGAS/GameTimer' );
var inherit = require( 'PHET_CORE/inherit' );
var Panel = require( 'SUN/Panel' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var Property = require( 'AXON/Property' );
var RichText = require( 'SCENERY/nodes/RichText' );
var ScoreDisplayStars = require( 'VEGAS/ScoreDisplayStars' );
var StringUtils = require( 'PHETCOMMON/util/StringUtils' );
var Tandem = require( 'TANDEM/Tandem' );
var Text = require( 'SCENERY/nodes/Text' );
var TextPushButton = require( 'SUN/buttons/TextPushButton' );
var VBox = require( 'SCENERY/nodes/VBox' );
var vegas = require( 'VEGAS/vegas' );
const Color = require( 'SCENERY/util/Color' );
const GameTimer = require( 'VEGAS/GameTimer' );
const inherit = require( 'PHET_CORE/inherit' );
const Panel = require( 'SUN/Panel' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const Property = require( 'AXON/Property' );
const RichText = require( 'SCENERY/nodes/RichText' );
const ScoreDisplayStars = require( 'VEGAS/ScoreDisplayStars' );
const StringUtils = require( 'PHETCOMMON/util/StringUtils' );
const Tandem = require( 'TANDEM/Tandem' );
const Text = require( 'SCENERY/nodes/Text' );
const TextPushButton = require( 'SUN/buttons/TextPushButton' );
const VBox = require( 'SCENERY/nodes/VBox' );
const vegas = require( 'VEGAS/vegas' );

// strings
var continueString = require( 'string!VEGAS/continue' );
var excellentString = require( 'string!VEGAS/excellent' );
var goodString = require( 'string!VEGAS/good' );
var greatString = require( 'string!VEGAS/great' );
var keepTryingString = require( 'string!VEGAS/keepTrying' );
var labelLevelString = require( 'string!VEGAS/label.level' );
var labelScoreMaxString = require( 'string!VEGAS/label.score.max' );
var labelTimeString = require( 'string!VEGAS/label.time' );
var pattern0YourBestString = require( 'string!VEGAS/pattern.0yourBest' );
var yourNewBestString = require( 'string!VEGAS/yourNewBest' );
const continueString = require( 'string!VEGAS/continue' );
const excellentString = require( 'string!VEGAS/excellent' );
const goodString = require( 'string!VEGAS/good' );
const greatString = require( 'string!VEGAS/great' );
const keepTryingString = require( 'string!VEGAS/keepTrying' );
const labelLevelString = require( 'string!VEGAS/label.level' );
const labelScoreMaxString = require( 'string!VEGAS/label.score.max' );
const labelTimeString = require( 'string!VEGAS/label.time' );
const pattern0YourBestString = require( 'string!VEGAS/pattern.0yourBest' );
const yourNewBestString = require( 'string!VEGAS/yourNewBest' );

/**
* @param {number} level - numerical value representing game level completed
Expand Down
30 changes: 15 additions & 15 deletions js/LevelSelectionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
* @author Chris Malley (PixelZoom, Inc.)
* @author Andrea Lin
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Dimension2 = require( 'DOT/Dimension2' );
var GameTimer = require( 'VEGAS/GameTimer' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );
var ScoreDisplayLabeledNumber = require( 'VEGAS/ScoreDisplayLabeledNumber' );
var ScoreDisplayLabeledStars = require( 'VEGAS/ScoreDisplayLabeledStars' );
var ScoreDisplayNumberAndStar = require( 'VEGAS/ScoreDisplayNumberAndStar' );
var ScoreDisplayStars = require( 'VEGAS/ScoreDisplayStars' );
var Tandem = require( 'TANDEM/Tandem' );
var Text = require( 'SCENERY/nodes/Text' );
var vegas = require( 'VEGAS/vegas' );
const Dimension2 = require( 'DOT/Dimension2' );
const GameTimer = require( 'VEGAS/GameTimer' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );
const ScoreDisplayLabeledNumber = require( 'VEGAS/ScoreDisplayLabeledNumber' );
const ScoreDisplayLabeledStars = require( 'VEGAS/ScoreDisplayLabeledStars' );
const ScoreDisplayNumberAndStar = require( 'VEGAS/ScoreDisplayNumberAndStar' );
const ScoreDisplayStars = require( 'VEGAS/ScoreDisplayStars' );
const Tandem = require( 'TANDEM/Tandem' );
const Text = require( 'SCENERY/nodes/Text' );
const vegas = require( 'VEGAS/vegas' );

// constants
var SCALING_TOLERANCE = 1E-4; // Empirically chosen as something the human eye is unlikely to notice.
Expand Down
32 changes: 16 additions & 16 deletions js/RewardDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@
* @author Andrea Lin
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Dialog = require( 'SUN/Dialog' );
var HBox = require( 'SCENERY/nodes/HBox' );
var Image = require( 'SCENERY/nodes/Image' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberProperty = require( 'AXON/NumberProperty' );
var PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );
var ScoreDisplayNumberAndStar = require( 'VEGAS/ScoreDisplayNumberAndStar' );
var Text = require( 'SCENERY/nodes/Text' );
var VBox = require( 'SCENERY/nodes/VBox' );
var vegas = require( 'VEGAS/vegas' );
const Dialog = require( 'SUN/Dialog' );
const HBox = require( 'SCENERY/nodes/HBox' );
const Image = require( 'SCENERY/nodes/Image' );
const inherit = require( 'PHET_CORE/inherit' );
const NumberProperty = require( 'AXON/NumberProperty' );
const PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );
const ScoreDisplayNumberAndStar = require( 'VEGAS/ScoreDisplayNumberAndStar' );
const Text = require( 'SCENERY/nodes/Text' );
const VBox = require( 'SCENERY/nodes/VBox' );
const vegas = require( 'VEGAS/vegas' );

// images
var phetGirlJugglingStarsImage = require( 'image!VEGAS/phet-girl-juggling-stars.png' );
const phetGirlJugglingStarsImage = require( 'image!VEGAS/phet-girl-juggling-stars.png' );

// strings
var keepGoingString = require( 'string!VEGAS/keepGoing' );
var newLevelString = require( 'string!VEGAS/newLevel' );
const keepGoingString = require( 'string!VEGAS/keepGoing' );
const newLevelString = require( 'string!VEGAS/newLevel' );

// constants
var DEFAULT_BUTTONS_FONT = new PhetFont( 16 );
Expand Down
20 changes: 10 additions & 10 deletions js/RewardNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Bounds2 = require( 'DOT/Bounds2' );
var CanvasNode = require( 'SCENERY/nodes/CanvasNode' );
var FaceNode = require( 'SCENERY_PHET/FaceNode' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var ScreenView = require( 'JOIST/ScreenView' );
var StarNode = require( 'SCENERY_PHET/StarNode' );
var vegas = require( 'VEGAS/vegas' );
const Bounds2 = require( 'DOT/Bounds2' );
const CanvasNode = require( 'SCENERY/nodes/CanvasNode' );
const FaceNode = require( 'SCENERY_PHET/FaceNode' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const ScreenView = require( 'JOIST/ScreenView' );
const StarNode = require( 'SCENERY_PHET/StarNode' );
const vegas = require( 'VEGAS/vegas' );

// ifphetio
var phetioEngine = require( 'ifphetio!PHET_IO/phetioEngine' );
const phetioEngine = require( 'ifphetio!PHET_IO/phetioEngine' );

// constants
var DEBUG = false; // shows a gray rectangle for the CanvasNode to help ensure that its bounds are accurate
Expand Down
18 changes: 9 additions & 9 deletions js/ScoreDisplayLabeledNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
*
* @author Andrea Lin
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var StatusBar = require( 'VEGAS/StatusBar' );
var StringUtils = require( 'PHETCOMMON/util/StringUtils' );
var Text = require( 'SCENERY/nodes/Text' );
var Util = require( 'DOT/Util' );
var vegas = require( 'VEGAS/vegas' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const StatusBar = require( 'VEGAS/StatusBar' );
const StringUtils = require( 'PHETCOMMON/util/StringUtils' );
const Text = require( 'SCENERY/nodes/Text' );
const Util = require( 'DOT/Util' );
const vegas = require( 'VEGAS/vegas' );

// strings
var patternScoreNumberString = require( 'string!VEGAS/pattern.score.number' );
const patternScoreNumberString = require( 'string!VEGAS/pattern.score.number' );

/**
* @param {Property.<number>} scoreProperty
Expand Down
Loading

0 comments on commit e3bddbf

Please sign in to comment.