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 authored and chrisklus committed Jun 2, 2021
1 parent 229ca9c commit 567db9e
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 101 deletions.
6 changes: 3 additions & 3 deletions js/make-a-ten/common/MakeATenConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
*
* @author Sharfudeen Ashraf
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Bounds2 = require( 'DOT/Bounds2' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
const Bounds2 = require( 'DOT/Bounds2' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );

var MakeATenConstants = {
// Initial layout bounds
Expand Down
4 changes: 2 additions & 2 deletions js/make-a-ten/common/MakeATenQueryParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Jonathan Olson <[email protected]>
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var makeATen = require( 'MAKE_A_TEN/makeATen' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );

var MakeATenQueryParameters = QueryStringMachine.getAll( {

Expand Down
10 changes: 5 additions & 5 deletions js/make-a-ten/common/MakeATenUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
*
* @author Sharfudeen Ashraf
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Image = require( 'SCENERY/nodes/Image' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var Node = require( 'SCENERY/nodes/Node' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Image = require( 'SCENERY/nodes/Image' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const Node = require( 'SCENERY/nodes/Node' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );

var MakeATenUtil = {
/**
Expand Down
12 changes: 6 additions & 6 deletions js/make-a-ten/common/model/AdditionTerms.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*
* @author Sharfudeen Ashraf
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ActiveTerm = require( 'MAKE_A_TEN/make-a-ten/adding/model/ActiveTerm' );
var inherit = require( 'PHET_CORE/inherit' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var NumberProperty = require( 'AXON/NumberProperty' );
var Property = require( 'AXON/Property' );
const ActiveTerm = require( 'MAKE_A_TEN/make-a-ten/adding/model/ActiveTerm' );
const inherit = require( 'PHET_CORE/inherit' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const NumberProperty = require( 'AXON/NumberProperty' );
const Property = require( 'AXON/Property' );

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

// modules
var inherit = require( 'PHET_CORE/inherit' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var MakeATenUtil = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenUtil' );
const inherit = require( 'PHET_CORE/inherit' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const MakeATenUtil = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenUtil' );

/**
* @constructor
Expand Down
10 changes: 5 additions & 5 deletions js/make-a-ten/common/model/BaseNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*
* @author Sharfudeen Ashraf
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BaseNumberNode = require( 'MAKE_A_TEN/make-a-ten/common/view/BaseNumberNode' );
var inherit = require( 'PHET_CORE/inherit' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var MakeATenUtil = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenUtil' );
const BaseNumberNode = require( 'MAKE_A_TEN/make-a-ten/common/view/BaseNumberNode' );
const inherit = require( 'PHET_CORE/inherit' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const MakeATenUtil = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenUtil' );

// Precompute bounds for each digit
var DIGIT_BOUNDS = [ 0, 1, 2, 3 ].map( function( place ) {
Expand Down
14 changes: 7 additions & 7 deletions js/make-a-ten/common/model/MakeATenCommonModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
*
* @author Sharfudeen Ashraf
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var MakeATenConstants = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenConstants' );
var ObservableArray = require( 'AXON/ObservableArray' );
var PaperNumber = require( 'MAKE_A_TEN/make-a-ten/common/model/PaperNumber' );
var Vector2 = require( 'DOT/Vector2' );
const inherit = require( 'PHET_CORE/inherit' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const MakeATenConstants = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenConstants' );
const ObservableArray = require( 'AXON/ObservableArray' );
const PaperNumber = require( 'MAKE_A_TEN/make-a-ten/common/model/PaperNumber' );
const Vector2 = require( 'DOT/Vector2' );

/**
* @constructor
Expand Down
24 changes: 12 additions & 12 deletions js/make-a-ten/common/model/PaperNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
*
* @author Sharfudeen Ashraf
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BaseNumber = require( 'MAKE_A_TEN/make-a-ten/common/model/BaseNumber' );
var BooleanProperty = require( 'AXON/BooleanProperty' );
var Bounds2 = require( 'DOT/Bounds2' );
var Emitter = require( 'AXON/Emitter' );
var inherit = require( 'PHET_CORE/inherit' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var MakeATenConstants = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenConstants' );
var MakeATenUtil = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenUtil' );
var NumberProperty = require( 'AXON/NumberProperty' );
var Vector2 = require( 'DOT/Vector2' );
var Vector2Property = require( 'DOT/Vector2Property' );
const BaseNumber = require( 'MAKE_A_TEN/make-a-ten/common/model/BaseNumber' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const Bounds2 = require( 'DOT/Bounds2' );
const Emitter = require( 'AXON/Emitter' );
const inherit = require( 'PHET_CORE/inherit' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const MakeATenConstants = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenConstants' );
const MakeATenUtil = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenUtil' );
const NumberProperty = require( 'AXON/NumberProperty' );
const Vector2 = require( 'DOT/Vector2' );
const Vector2Property = require( 'DOT/Vector2Property' );

// Incremented for PaperNumber IDs
var nextPaperNumberId = 1;
Expand Down
24 changes: 12 additions & 12 deletions js/make-a-ten/common/view/AdditionTermsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
*
* @author Sharfudeen Ashraf
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ActiveTerm = require( 'MAKE_A_TEN/make-a-ten/adding/model/ActiveTerm' );
var HBox = require( 'SCENERY/nodes/HBox' );
var inherit = require( 'PHET_CORE/inherit' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var MakeATenConstants = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenConstants' );
var MathSymbols = require( 'SCENERY_PHET/MathSymbols' );
var Node = require( 'SCENERY/nodes/Node' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var Property = require( 'AXON/Property' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var Text = require( 'SCENERY/nodes/Text' );
const ActiveTerm = require( 'MAKE_A_TEN/make-a-ten/adding/model/ActiveTerm' );
const HBox = require( 'SCENERY/nodes/HBox' );
const inherit = require( 'PHET_CORE/inherit' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const MakeATenConstants = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenConstants' );
const MathSymbols = require( 'SCENERY_PHET/MathSymbols' );
const Node = require( 'SCENERY/nodes/Node' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const Property = require( 'AXON/Property' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Text = require( 'SCENERY/nodes/Text' );

// constants
var EQUATION_FONT = new PhetFont( { size: 45, weight: 'bold' } );
Expand Down
42 changes: 21 additions & 21 deletions js/make-a-ten/common/view/BaseNumberNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@
*
* @author Jonathan Olson <[email protected]>
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Dimension2 = require( 'DOT/Dimension2' );
var Image = require( 'SCENERY/nodes/Image' );
var inherit = require( 'PHET_CORE/inherit' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var Node = require( 'SCENERY/nodes/Node' );
var Vector2 = require( 'DOT/Vector2' );
const Dimension2 = require( 'DOT/Dimension2' );
const Image = require( 'SCENERY/nodes/Image' );
const inherit = require( 'PHET_CORE/inherit' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const Node = require( 'SCENERY/nodes/Node' );
const Vector2 = require( 'DOT/Vector2' );

// images
var imageDigit0 = require( 'mipmap!MAKE_A_TEN/digit-0.png' );
var imageDigit1 = require( 'mipmap!MAKE_A_TEN/digit-1.png' );
var imageDigit2 = require( 'mipmap!MAKE_A_TEN/digit-2.png' );
var imageDigit3 = require( 'mipmap!MAKE_A_TEN/digit-3.png' );
var imageDigit4 = require( 'mipmap!MAKE_A_TEN/digit-4.png' );
var imageDigit5 = require( 'mipmap!MAKE_A_TEN/digit-5.png' );
var imageDigit6 = require( 'mipmap!MAKE_A_TEN/digit-6.png' );
var imageDigit7 = require( 'mipmap!MAKE_A_TEN/digit-7.png' );
var imageDigit8 = require( 'mipmap!MAKE_A_TEN/digit-8.png' );
var imageDigit9 = require( 'mipmap!MAKE_A_TEN/digit-9.png' );
var imagePaperBackground1 = require( 'mipmap!MAKE_A_TEN/paper-background-1.png' );
var imagePaperBackground10 = require( 'mipmap!MAKE_A_TEN/paper-background-10.png' );
var imagePaperBackground100 = require( 'mipmap!MAKE_A_TEN/paper-background-100.png' );
var imagePaperBackground1000 = require( 'mipmap!MAKE_A_TEN/paper-background-1000.png' );
const imageDigit0 = require( 'mipmap!MAKE_A_TEN/digit-0.png' );
const imageDigit1 = require( 'mipmap!MAKE_A_TEN/digit-1.png' );
const imageDigit2 = require( 'mipmap!MAKE_A_TEN/digit-2.png' );
const imageDigit3 = require( 'mipmap!MAKE_A_TEN/digit-3.png' );
const imageDigit4 = require( 'mipmap!MAKE_A_TEN/digit-4.png' );
const imageDigit5 = require( 'mipmap!MAKE_A_TEN/digit-5.png' );
const imageDigit6 = require( 'mipmap!MAKE_A_TEN/digit-6.png' );
const imageDigit7 = require( 'mipmap!MAKE_A_TEN/digit-7.png' );
const imageDigit8 = require( 'mipmap!MAKE_A_TEN/digit-8.png' );
const imageDigit9 = require( 'mipmap!MAKE_A_TEN/digit-9.png' );
const imagePaperBackground1 = require( 'mipmap!MAKE_A_TEN/paper-background-1.png' );
const imagePaperBackground10 = require( 'mipmap!MAKE_A_TEN/paper-background-10.png' );
const imagePaperBackground100 = require( 'mipmap!MAKE_A_TEN/paper-background-100.png' );
const imagePaperBackground1000 = require( 'mipmap!MAKE_A_TEN/paper-background-1000.png' );

// place => mipmap info
var BACKGROUND_IMAGE_MAP = {
Expand Down
24 changes: 12 additions & 12 deletions js/make-a-ten/common/view/MakeATenCommonView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
*
* @author Sharfudeen Ashraf
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ArithmeticRules = require( 'MAKE_A_TEN/make-a-ten/common/model/ArithmeticRules' );
var ClosestDragListener = require( 'SUN/ClosestDragListener' );
var inherit = require( 'PHET_CORE/inherit' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var MakeATenConstants = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenConstants' );
var Node = require( 'SCENERY/nodes/Node' );
var PaperNumberNode = require( 'MAKE_A_TEN/make-a-ten/common/view/PaperNumberNode' );
var Plane = require( 'SCENERY/nodes/Plane' );
var Property = require( 'AXON/Property' );
var ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' );
var ScreenView = require( 'JOIST/ScreenView' );
const ArithmeticRules = require( 'MAKE_A_TEN/make-a-ten/common/model/ArithmeticRules' );
const ClosestDragListener = require( 'SUN/ClosestDragListener' );
const inherit = require( 'PHET_CORE/inherit' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const MakeATenConstants = require( 'MAKE_A_TEN/make-a-ten/common/MakeATenConstants' );
const Node = require( 'SCENERY/nodes/Node' );
const PaperNumberNode = require( 'MAKE_A_TEN/make-a-ten/common/view/PaperNumberNode' );
const Plane = require( 'SCENERY/nodes/Plane' );
const Property = require( 'AXON/Property' );
const ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' );
const ScreenView = require( 'JOIST/ScreenView' );

/**
* @constructor
Expand Down
24 changes: 12 additions & 12 deletions js/make-a-ten/common/view/PaperNumberNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
*
* @author Sharfudeen Ashraf
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ArithmeticRules = require( 'MAKE_A_TEN/make-a-ten/common/model/ArithmeticRules' );
var arrayRemove = require( 'PHET_CORE/arrayRemove' );
var BaseNumber = require( 'MAKE_A_TEN/make-a-ten/common/model/BaseNumber' );
var BaseNumberNode = require( 'MAKE_A_TEN/make-a-ten/common/view/BaseNumberNode' );
var DragListener = require( 'SCENERY/listeners/DragListener' );
var Emitter = require( 'AXON/Emitter' );
var inherit = require( 'PHET_CORE/inherit' );
var makeATen = require( 'MAKE_A_TEN/makeATen' );
var Node = require( 'SCENERY/nodes/Node' );
var PaperNumber = require( 'MAKE_A_TEN/make-a-ten/common/model/PaperNumber' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
const ArithmeticRules = require( 'MAKE_A_TEN/make-a-ten/common/model/ArithmeticRules' );
const arrayRemove = require( 'PHET_CORE/arrayRemove' );
const BaseNumber = require( 'MAKE_A_TEN/make-a-ten/common/model/BaseNumber' );
const BaseNumberNode = require( 'MAKE_A_TEN/make-a-ten/common/view/BaseNumberNode' );
const DragListener = require( 'SCENERY/listeners/DragListener' );
const Emitter = require( 'AXON/Emitter' );
const inherit = require( 'PHET_CORE/inherit' );
const makeATen = require( 'MAKE_A_TEN/makeATen' );
const Node = require( 'SCENERY/nodes/Node' );
const PaperNumber = require( 'MAKE_A_TEN/make-a-ten/common/model/PaperNumber' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );

/**
* @constructor
Expand Down

0 comments on commit 567db9e

Please sign in to comment.