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 Oct 14, 2019
1 parent 7e435e0 commit 87f0130
Show file tree
Hide file tree
Showing 182 changed files with 1,165 additions and 1,165 deletions.
4 changes: 2 additions & 2 deletions js/accessibility/A11yBehaviorFunctionDef.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* @author Michael Kauzmann (PhET Interactive Simulations)
*/

define( function( require ) {
define( require => {
'use strict';

var scenery = require( 'SCENERY/scenery' );
const scenery = require( 'SCENERY/scenery' );

/**
* @name a11yBehaviorFunction
Expand Down
20 changes: 10 additions & 10 deletions js/accessibility/Accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,19 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Michael Kauzmann (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var A11yBehaviorFunctionDef = require( 'SCENERY/accessibility/A11yBehaviorFunctionDef' );
var AccessibilityTree = require( 'SCENERY/accessibility/AccessibilityTree' );
var AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
var AccessibleDisplaysInfo = require( 'SCENERY/accessibility/AccessibleDisplaysInfo' );
var AccessiblePeer = require( 'SCENERY/accessibility/AccessiblePeer' );
var arrayDifference = require( 'PHET_CORE/arrayDifference' );
var extend = require( 'PHET_CORE/extend' );
var scenery = require( 'SCENERY/scenery' );
var Shape = require( 'KITE/Shape' );
const A11yBehaviorFunctionDef = require( 'SCENERY/accessibility/A11yBehaviorFunctionDef' );
const AccessibilityTree = require( 'SCENERY/accessibility/AccessibilityTree' );
const AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
const AccessibleDisplaysInfo = require( 'SCENERY/accessibility/AccessibleDisplaysInfo' );
const AccessiblePeer = require( 'SCENERY/accessibility/AccessiblePeer' );
const arrayDifference = require( 'PHET_CORE/arrayDifference' );
const extend = require( 'PHET_CORE/extend' );
const scenery = require( 'SCENERY/scenery' );
const Shape = require( 'KITE/Shape' );

var INPUT_TAG = AccessibilityUtil.TAGS.INPUT;
var P_TAG = AccessibilityUtil.TAGS.P;
Expand Down
18 changes: 9 additions & 9 deletions js/accessibility/AccessibilityFuzzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
* @author Jonathan Olson <[email protected]>
*/

define( function( require ) {
define( require => {
'use strict';

// modules
var AccessibilityTree = require( 'SCENERY/accessibility/AccessibilityTree' );
var arrayDifference = require( 'PHET_CORE/arrayDifference' );
var Display = require( 'SCENERY/display/Display' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var Permutation = require( 'DOT/Permutation' );
var Random = require( 'DOT/Random' );
var scenery = require( 'SCENERY/scenery' );
const AccessibilityTree = require( 'SCENERY/accessibility/AccessibilityTree' );
const arrayDifference = require( 'PHET_CORE/arrayDifference' );
const Display = require( 'SCENERY/display/Display' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const Permutation = require( 'DOT/Permutation' );
const Random = require( 'DOT/Random' );
const scenery = require( 'SCENERY/scenery' );

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

// modules
var AccessibilityFuzzer = require( 'SCENERY/accessibility/AccessibilityFuzzer' );
var AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
var AccessiblePeer = require( 'SCENERY/accessibility/AccessiblePeer' );
var Circle = require( 'SCENERY/nodes/Circle' );
var Display = require( 'SCENERY/display/Display' );
var Node = require( 'SCENERY/nodes/Node' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
const AccessibilityFuzzer = require( 'SCENERY/accessibility/AccessibilityFuzzer' );
const AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
const AccessiblePeer = require( 'SCENERY/accessibility/AccessiblePeer' );
const Circle = require( 'SCENERY/nodes/Circle' );
const Display = require( 'SCENERY/display/Display' );
const Node = require( 'SCENERY/nodes/Node' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );

// constants
var TEST_INNER_CONTENT = 'Test Inner Content Here please^&*. Thanks you so very mucho.';
Expand Down
12 changes: 6 additions & 6 deletions js/accessibility/AccessibilityTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
* @author Jonathan Olson <[email protected]>
*/

define( function( require ) {
define( require => {
'use strict';

// modules
var AccessibleInstance = require( 'SCENERY/accessibility/AccessibleInstance' );
var arrayDifference = require( 'PHET_CORE/arrayDifference' );
var PartialAccessibleTrail = require( 'SCENERY/accessibility/PartialAccessibleTrail' );
var scenery = require( 'SCENERY/scenery' );
const AccessibleInstance = require( 'SCENERY/accessibility/AccessibleInstance' );
const arrayDifference = require( 'PHET_CORE/arrayDifference' );
const PartialAccessibleTrail = require( 'SCENERY/accessibility/PartialAccessibleTrail' );
const scenery = require( 'SCENERY/scenery' );
// commented out so Require.js doesn't balk at the circular dependency
// var Trail = require( 'SCENERY/util/Trail' );
// const Trail = require( 'SCENERY/util/Trail' );

// globals (for restoring focus)
var focusedNode = null;
Expand Down
10 changes: 5 additions & 5 deletions js/accessibility/AccessibilityUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
* @author Jesse Greenberg
*/

define( function( require ) {
define( require => {
'use strict';

// modules
var AccessibleSiblingStyle = require( 'SCENERY/accessibility/AccessibleSiblingStyle' );
var Random = require( 'DOT/Random' );
var scenery = require( 'SCENERY/scenery' );
var validate = require( 'AXON/validate' );
const AccessibleSiblingStyle = require( 'SCENERY/accessibility/AccessibleSiblingStyle' );
const Random = require( 'DOT/Random' );
const scenery = require( 'SCENERY/scenery' );
const validate = require( 'AXON/validate' );

// constants
var NEXT = 'NEXT';
Expand Down
4 changes: 2 additions & 2 deletions js/accessibility/AccessibilityUtilTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
const AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );

QUnit.module( 'AccessibilityUtilTests' );

Expand Down
8 changes: 4 additions & 4 deletions js/accessibility/AccessibleDisplaysInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
*
* @author Jonathan Olson <[email protected]>
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var Renderer = require( 'SCENERY/display/Renderer' );
var scenery = require( 'SCENERY/scenery' );
const inherit = require( 'PHET_CORE/inherit' );
const Renderer = require( 'SCENERY/display/Renderer' );
const scenery = require( 'SCENERY/scenery' );

/**
* Tracks accessible display information for our given node.
Expand Down
20 changes: 10 additions & 10 deletions js/accessibility/AccessibleInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
* @author Jonathan Olson <[email protected]>
*/

define( function( require ) {
define( require => {
'use strict';

var AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
var AccessiblePeer = require( 'SCENERY/accessibility/AccessiblePeer' );
var cleanArray = require( 'PHET_CORE/cleanArray' );
var Events = require( 'AXON/Events' );
var inherit = require( 'PHET_CORE/inherit' );
var platform = require( 'PHET_CORE/platform' );
var Poolable = require( 'PHET_CORE/Poolable' );
var scenery = require( 'SCENERY/scenery' );
var TransformTracker = require( 'SCENERY/util/TransformTracker' );
const AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
const AccessiblePeer = require( 'SCENERY/accessibility/AccessiblePeer' );
const cleanArray = require( 'PHET_CORE/cleanArray' );
const Events = require( 'AXON/Events' );
const inherit = require( 'PHET_CORE/inherit' );
const platform = require( 'PHET_CORE/platform' );
const Poolable = require( 'PHET_CORE/Poolable' );
const scenery = require( 'SCENERY/scenery' );
const TransformTracker = require( 'SCENERY/util/TransformTracker' );

var globalId = 1;

Expand Down
24 changes: 12 additions & 12 deletions js/accessibility/AccessiblePeer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
* @author Jesse Greenberg
*/

define( function( require ) {
define( require => {
'use strict';

var AccessibleSiblingStyle = require( 'SCENERY/accessibility/AccessibleSiblingStyle' );
var AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
var arrayRemove = require( 'PHET_CORE/arrayRemove' );
var Bounds2 = require( 'DOT/Bounds2' );
var FullScreen = require( 'SCENERY/util/FullScreen' );
var inherit = require( 'PHET_CORE/inherit' );
var Matrix3 = require( 'DOT/Matrix3' );
var platform = require( 'PHET_CORE/platform' );
var Poolable = require( 'PHET_CORE/Poolable' );
var scenery = require( 'SCENERY/scenery' );
const AccessibleSiblingStyle = require( 'SCENERY/accessibility/AccessibleSiblingStyle' );
const AccessibilityUtil = require( 'SCENERY/accessibility/AccessibilityUtil' );
const arrayRemove = require( 'PHET_CORE/arrayRemove' );
const Bounds2 = require( 'DOT/Bounds2' );
const FullScreen = require( 'SCENERY/util/FullScreen' );
const inherit = require( 'PHET_CORE/inherit' );
const Matrix3 = require( 'DOT/Matrix3' );
const platform = require( 'PHET_CORE/platform' );
const Poolable = require( 'PHET_CORE/Poolable' );
const scenery = require( 'SCENERY/scenery' );
// so RequireJS doesn't complain about circular dependency
// var Display = require( 'SCENERY/display/Display' );
// const Display = require( 'SCENERY/display/Display' );

// constants
var PRIMARY_SIBLING = 'PRIMARY_SIBLING';
Expand Down
2 changes: 1 addition & 1 deletion js/accessibility/AccessibleSiblingTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand Down
6 changes: 3 additions & 3 deletions js/accessibility/Focus.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
*
* @author Jesse Greenberg
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var scenery = require( 'SCENERY/scenery' );
const inherit = require( 'PHET_CORE/inherit' );
const scenery = require( 'SCENERY/scenery' );

/**
* Constructor.
Expand Down
10 changes: 5 additions & 5 deletions js/accessibility/FocusHighlightFromNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
* @author Michael Kauzmann (PhET Interactive Simulations)
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var FocusHighlightPath = require( 'SCENERY/accessibility/FocusHighlightPath' );
var inherit = require( 'PHET_CORE/inherit' );
var scenery = require( 'SCENERY/scenery' );
var Shape = require( 'KITE/Shape' );
const FocusHighlightPath = require( 'SCENERY/accessibility/FocusHighlightPath' );
const inherit = require( 'PHET_CORE/inherit' );
const scenery = require( 'SCENERY/scenery' );
const Shape = require( 'KITE/Shape' );

/**
*
Expand Down
16 changes: 8 additions & 8 deletions js/accessibility/FocusHighlightPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
*/

define( function( require ) {
define( require => {
'use strict';

// modules
var Color = require( 'SCENERY/util/Color' );
var Emitter = require( 'AXON/Emitter' );
var inherit = require( 'PHET_CORE/inherit' );
var LineStyles = require( 'KITE/util/LineStyles' );
var Path = require( 'SCENERY/nodes/Path' );
var scenery = require( 'SCENERY/scenery' );
var Vector2 = require( 'DOT/Vector2' );
const Color = require( 'SCENERY/util/Color' );
const Emitter = require( 'AXON/Emitter' );
const inherit = require( 'PHET_CORE/inherit' );
const LineStyles = require( 'KITE/util/LineStyles' );
const Path = require( 'SCENERY/nodes/Path' );
const scenery = require( 'SCENERY/scenery' );
const Vector2 = require( 'DOT/Vector2' );

// constants
// default inner and outer strokes for the focus highlight
Expand Down
10 changes: 5 additions & 5 deletions js/accessibility/FocusIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Focus = require( 'SCENERY/accessibility/Focus' );
var ObjectIO = require( 'TANDEM/types/ObjectIO' );
var scenery = require( 'SCENERY/scenery' );
var validate = require( 'AXON/validate' );
const Focus = require( 'SCENERY/accessibility/Focus' );
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
const scenery = require( 'SCENERY/scenery' );
const validate = require( 'AXON/validate' );

class FocusIO extends ObjectIO {

Expand Down
8 changes: 4 additions & 4 deletions js/accessibility/FocusTests.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 Display = require( 'SCENERY/display/Display' );
var Node = require( 'SCENERY/nodes/Node' );
var Trail = require( 'SCENERY/util/Trail' );
const Display = require( 'SCENERY/display/Display' );
const Node = require( 'SCENERY/nodes/Node' );
const Trail = require( 'SCENERY/util/Trail' );

QUnit.module( 'Focus' );

Expand Down
10 changes: 5 additions & 5 deletions js/accessibility/GroupFocusHighlightFromNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
*
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var FocusHighlightFromNode = require( 'SCENERY/accessibility/FocusHighlightFromNode' );
var FocusHighlightPath = require( 'SCENERY/accessibility/FocusHighlightPath' );
var inherit = require( 'PHET_CORE/inherit' );
var scenery = require( 'SCENERY/scenery' );
const FocusHighlightFromNode = require( 'SCENERY/accessibility/FocusHighlightFromNode' );
const FocusHighlightPath = require( 'SCENERY/accessibility/FocusHighlightPath' );
const inherit = require( 'PHET_CORE/inherit' );
const scenery = require( 'SCENERY/scenery' );

/**
*
Expand Down
4 changes: 2 additions & 2 deletions js/accessibility/KeyboardUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
*
* @author Jesse Greenberg
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var scenery = require( 'SCENERY/scenery' );
const scenery = require( 'SCENERY/scenery' );

var KEY_RIGHT_ARROW = 39;
var KEY_LEFT_ARROW = 37;
Expand Down
6 changes: 3 additions & 3 deletions js/accessibility/PartialAccessibleTrail.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* @author Jonathan Olson <[email protected]>
*/

define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var scenery = require( 'SCENERY/scenery' );
const inherit = require( 'PHET_CORE/inherit' );
const scenery = require( 'SCENERY/scenery' );

/**
* @constructor
Expand Down
Loading

0 comments on commit 87f0130

Please sign in to comment.