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 f4132b1 commit eff3b62
Show file tree
Hide file tree
Showing 73 changed files with 528 additions and 528 deletions.
24 changes: 12 additions & 12 deletions js/ABSwitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ButtonListener = require( 'SCENERY/input/ButtonListener' );
var Dimension2 = require( 'DOT/Dimension2' );
var inherit = require( 'PHET_CORE/inherit' );
var InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
var Line = require( 'SCENERY/nodes/Line' );
var LinearGradient = require( 'SCENERY/util/LinearGradient' );
var Node = require( 'SCENERY/nodes/Node' );
var OnOffSwitch = require( 'SUN/OnOffSwitch' );
var Property = require( 'AXON/Property' );
var sun = require( 'SUN/sun' );
var Tandem = require( 'TANDEM/Tandem' );
const ButtonListener = require( 'SCENERY/input/ButtonListener' );
const Dimension2 = require( 'DOT/Dimension2' );
const inherit = require( 'PHET_CORE/inherit' );
const InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
const Line = require( 'SCENERY/nodes/Line' );
const LinearGradient = require( 'SCENERY/util/LinearGradient' );
const Node = require( 'SCENERY/nodes/Node' );
const OnOffSwitch = require( 'SUN/OnOffSwitch' );
const Property = require( 'AXON/Property' );
const sun = require( 'SUN/sun' );
const Tandem = require( 'TANDEM/Tandem' );

/**
* @param {Property.<*>} property stores the value of the current choice
Expand Down
32 changes: 16 additions & 16 deletions js/AccordionBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
* @author John Blanco (PhET Interactive Simulations)
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AccordionBoxIO = require( 'SUN/AccordionBoxIO' );
var BooleanProperty = require( 'AXON/BooleanProperty' );
var Emitter = require( 'AXON/Emitter' );
var EventType = require( 'TANDEM/EventType' );
var ExpandCollapseButton = require( 'SUN/ExpandCollapseButton' );
var inherit = require( 'PHET_CORE/inherit' );
var InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
var Node = require( 'SCENERY/nodes/Node' );
var Path = require( 'SCENERY/nodes/Path' );
var PhetioObject = require( 'TANDEM/PhetioObject' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var Shape = require( 'KITE/Shape' );
var sun = require( 'SUN/sun' );
var Tandem = require( 'TANDEM/Tandem' );
var Text = require( 'SCENERY/nodes/Text' );
const AccordionBoxIO = require( 'SUN/AccordionBoxIO' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const Emitter = require( 'AXON/Emitter' );
const EventType = require( 'TANDEM/EventType' );
const ExpandCollapseButton = require( 'SUN/ExpandCollapseButton' );
const inherit = require( 'PHET_CORE/inherit' );
const InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const PhetioObject = require( 'TANDEM/PhetioObject' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Shape = require( 'KITE/Shape' );
const sun = require( 'SUN/sun' );
const Tandem = require( 'TANDEM/Tandem' );
const Text = require( 'SCENERY/nodes/Text' );

/**
* @constructor
Expand Down
6 changes: 3 additions & 3 deletions js/AccordionBoxIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var NodeIO = require( 'SCENERY/nodes/NodeIO' );
const NodeIO = require( 'SCENERY/nodes/NodeIO' );
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
var sun = require( 'SUN/sun' );
const sun = require( 'SUN/sun' );

class AccordionBoxIO extends NodeIO {}

Expand Down
22 changes: 11 additions & 11 deletions js/AquaRadioButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var Circle = require( 'SCENERY/nodes/Circle' );
var FireListener = require( 'SCENERY/listeners/FireListener' );
var inherit = require( 'PHET_CORE/inherit' );
var InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
var Node = require( 'SCENERY/nodes/Node' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var sun = require( 'SUN/sun' );
var SunConstants = require( 'SUN/SunConstants' );
var Tandem = require( 'TANDEM/Tandem' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const Circle = require( 'SCENERY/nodes/Circle' );
const FireListener = require( 'SCENERY/listeners/FireListener' );
const inherit = require( 'PHET_CORE/inherit' );
const InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
const Node = require( 'SCENERY/nodes/Node' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const sun = require( 'SUN/sun' );
const SunConstants = require( 'SUN/SunConstants' );
const Tandem = require( 'TANDEM/Tandem' );

// constants
var DEFAULT_RADIUS = 7;
Expand Down
8 changes: 4 additions & 4 deletions js/BooleanToggleNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var sun = require( 'SUN/sun' );
var ToggleNode = require( 'SUN/ToggleNode' );
const inherit = require( 'PHET_CORE/inherit' );
const sun = require( 'SUN/sun' );
const ToggleNode = require( 'SUN/ToggleNode' );

/**
* @param {Node} trueNode
Expand Down
8 changes: 4 additions & 4 deletions js/CallbackTimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var sun = require( 'SUN/sun' );
var timer = require( 'AXON/timer' );
const inherit = require( 'PHET_CORE/inherit' );
const sun = require( 'SUN/sun' );
const timer = require( 'AXON/timer' );

/**
* @param {Object} [options]
Expand Down
2 changes: 1 addition & 1 deletion js/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand Down
30 changes: 15 additions & 15 deletions js/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Action = require( 'AXON/Action' );
var BooleanIO = require( 'TANDEM/types/BooleanIO' );
var BooleanProperty = require( 'AXON/BooleanProperty' );
var ButtonListener = require( 'SCENERY/input/ButtonListener' );
var EventType = require( 'TANDEM/EventType' );
var FontAwesomeNode = require( 'SUN/FontAwesomeNode' );
var inherit = require( 'PHET_CORE/inherit' );
var InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
var Node = require( 'SCENERY/nodes/Node' );
var PhetioObject = require( 'TANDEM/PhetioObject' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var sun = require( 'SUN/sun' );
var SunConstants = require( 'SUN/SunConstants' );
var Tandem = require( 'TANDEM/Tandem' );
const Action = require( 'AXON/Action' );
const BooleanIO = require( 'TANDEM/types/BooleanIO' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const ButtonListener = require( 'SCENERY/input/ButtonListener' );
const EventType = require( 'TANDEM/EventType' );
const FontAwesomeNode = require( 'SUN/FontAwesomeNode' );
const inherit = require( 'PHET_CORE/inherit' );
const InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
const Node = require( 'SCENERY/nodes/Node' );
const PhetioObject = require( 'TANDEM/PhetioObject' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const sun = require( 'SUN/sun' );
const SunConstants = require( 'SUN/SunConstants' );
const Tandem = require( 'TANDEM/Tandem' );

// constants
const ENABLED_PROPERTY_TANDEM_NAME = 'enabledProperty';
Expand Down
10 changes: 5 additions & 5 deletions js/ClosestDragListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
*
* @author Jonathan Olson (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var Mouse = require( 'SCENERY/input/Mouse' );
var sun = require( 'SUN/sun' );
var Touch = require( 'SCENERY/input/Touch' );
const inherit = require( 'PHET_CORE/inherit' );
const Mouse = require( 'SCENERY/input/Mouse' );
const sun = require( 'SUN/sun' );
const Touch = require( 'SCENERY/input/Touch' );

/**
* @constructor
Expand Down
8 changes: 4 additions & 4 deletions js/ColorConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Color = require( 'SCENERY/util/Color' );
var inherit = require( 'PHET_CORE/inherit' );
var sun = require( 'SUN/sun' );
const Color = require( 'SCENERY/util/Color' );
const inherit = require( 'PHET_CORE/inherit' );
const sun = require( 'SUN/sun' );

/**
*
Expand Down
6 changes: 3 additions & 3 deletions js/ComboBoxIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
var NodeIO = require( 'SCENERY/nodes/NodeIO' );
var sun = require( 'SUN/sun' );
const NodeIO = require( 'SCENERY/nodes/NodeIO' );
const sun = require( 'SUN/sun' );

class ComboBoxIO extends NodeIO {}

Expand Down
6 changes: 3 additions & 3 deletions js/DialogIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
*
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

var NodeIO = require( 'SCENERY/nodes/NodeIO' );
const NodeIO = require( 'SCENERY/nodes/NodeIO' );
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
var sun = require( 'SUN/sun' );
const sun = require( 'SUN/sun' );

class DialogIO extends NodeIO {}

Expand Down
16 changes: 8 additions & 8 deletions js/ExpandCollapseBar.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 ExpandCollapseButton = require( 'SUN/ExpandCollapseButton' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var Shape = require( 'KITE/Shape' );
var sun = require( 'SUN/sun' );
var Tandem = require( 'TANDEM/Tandem' );
const ExpandCollapseButton = require( 'SUN/ExpandCollapseButton' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Shape = require( 'KITE/Shape' );
const sun = require( 'SUN/sun' );
const Tandem = require( 'TANDEM/Tandem' );

/**
* @param {Node} titleNode
Expand Down
12 changes: 6 additions & 6 deletions js/FontAwesomeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var Matrix3 = require( 'DOT/Matrix3' );
var Path = require( 'SCENERY/nodes/Path' );
var Shape = require( 'KITE/Shape' );
var sun = require( 'SUN/sun' );
const inherit = require( 'PHET_CORE/inherit' );
const Matrix3 = require( 'DOT/Matrix3' );
const Path = require( 'SCENERY/nodes/Path' );
const Shape = require( 'KITE/Shape' );
const sun = require( 'SUN/sun' );

/*
* This data structure contains SVG descriptions of Font Awesome icons used in PhET simulations.
Expand Down
8 changes: 4 additions & 4 deletions js/HSeparator.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var Line = require( 'SCENERY/nodes/Line' );
var sun = require( 'SUN/sun' );
const inherit = require( 'PHET_CORE/inherit' );
const Line = require( 'SCENERY/nodes/Line' );
const sun = require( 'SUN/sun' );

/**
* @param {number} width
Expand Down
2 changes: 1 addition & 1 deletion js/HSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand Down
24 changes: 12 additions & 12 deletions js/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
*
* @author Michael Kauzmann (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
var EventType = require( 'TANDEM/EventType' );
var FireListener = require( 'SCENERY/listeners/FireListener' );
var FontAwesomeNode = require( 'SUN/FontAwesomeNode' );
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 sun = require( 'SUN/sun' );
var Tandem = require( 'TANDEM/Tandem' );
var Text = require( 'SCENERY/nodes/Text' );
const AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
const EventType = require( 'TANDEM/EventType' );
const FireListener = require( 'SCENERY/listeners/FireListener' );
const FontAwesomeNode = require( 'SUN/FontAwesomeNode' );
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 sun = require( 'SUN/sun' );
const Tandem = require( 'TANDEM/Tandem' );
const Text = require( 'SCENERY/nodes/Text' );

// the check mark used for toggle-able menu items
var CHECK_MARK_NODE = new FontAwesomeNode( 'check', {
Expand Down
Loading

0 comments on commit eff3b62

Please sign in to comment.