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 056199f commit ee03aad
Show file tree
Hide file tree
Showing 58 changed files with 553 additions and 553 deletions.
22 changes: 11 additions & 11 deletions js/basics/EEBasicsScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' );
var EEBasicsIconNode = require( 'EXPRESSION_EXCHANGE/basics/view/EEBasicsIconNode' );
var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var ExpressionExplorationScreenView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionExplorationScreenView' );
var ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' );
var inherit = require( 'PHET_CORE/inherit' );
var Property = require( 'AXON/Property' );
var Screen = require( 'JOIST/Screen' );
const CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' );
const EEBasicsIconNode = require( 'EXPRESSION_EXCHANGE/basics/view/EEBasicsIconNode' );
const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const ExpressionExplorationScreenView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionExplorationScreenView' );
const ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' );
const inherit = require( 'PHET_CORE/inherit' );
const Property = require( 'AXON/Property' );
const Screen = require( 'JOIST/Screen' );

// strings
var basicsString = require( 'string!EXPRESSION_EXCHANGE/basics' );
const basicsString = require( 'string!EXPRESSION_EXCHANGE/basics' );

/**
* @constructor
Expand Down
22 changes: 11 additions & 11 deletions js/basics/view/EEBasicsIconNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' );
var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' );
var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var inherit = require( 'PHET_CORE/inherit' );
var MathSymbols = require( 'SCENERY_PHET/MathSymbols' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var Screen = require( 'JOIST/Screen' );
var Text = require( 'SCENERY/nodes/Text' );
const CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' );
const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' );
const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const inherit = require( 'PHET_CORE/inherit' );
const MathSymbols = require( 'SCENERY_PHET/MathSymbols' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Screen = require( 'JOIST/Screen' );
const Text = require( 'SCENERY/nodes/Text' );

// constants
var ICON_SIZE = Screen.MINIMUM_HOME_SCREEN_ICON_SIZE;
Expand Down
4 changes: 2 additions & 2 deletions js/common/EEQueryParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );

var EEQueryParameters = QueryStringMachine.getAll( {

Expand Down
10 changes: 5 additions & 5 deletions js/common/EESharedConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* Constants that are shared between the various portions of the Expression Exchange simulation.
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Bounds2 = require( 'DOT/Bounds2' );
var Color = require( 'SCENERY/util/Color' );
var Dimension2 = require( 'DOT/Dimension2' );
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const Bounds2 = require( 'DOT/Bounds2' );
const Color = require( 'SCENERY/util/Color' );
const Dimension2 = require( 'DOT/Dimension2' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );

var EESharedConstants = {

Expand Down
4 changes: 2 additions & 2 deletions js/common/enum/AllowedRepresentations.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );

var AllowedRepresentations = {
COINS_ONLY: 'COINS_ONLY',
Expand Down
4 changes: 2 additions & 2 deletions js/common/enum/CoinTermCreatorSetID.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );

var CoinTermCreatorSetID = {
BASICS: 'BASICS',
Expand Down
4 changes: 2 additions & 2 deletions js/common/enum/CoinTermTypeID.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* enum that defines the different types of coin terms
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );

var CoinTermTypeID = {
X: 'X',
Expand Down
4 changes: 2 additions & 2 deletions js/common/enum/ViewMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );

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

// modules
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var inherit = require( 'PHET_CORE/inherit' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @param {Vector2} startPosition - the location from which the animation should begin
Expand Down
22 changes: 11 additions & 11 deletions js/common/model/CoinTerm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AnimationSpec = require( 'EXPRESSION_EXCHANGE/common/model/AnimationSpec' );
var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' );
var Easing = require( 'TWIXT/Easing' );
var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
var Emitter = require( 'AXON/Emitter' );
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var inherit = require( 'PHET_CORE/inherit' );
var Property = require( 'AXON/Property' );
var Vector2 = require( 'DOT/Vector2' );
var Vector2Property = require( 'DOT/Vector2Property' );
const AnimationSpec = require( 'EXPRESSION_EXCHANGE/common/model/AnimationSpec' );
const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' );
const Easing = require( 'TWIXT/Easing' );
const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
const Emitter = require( 'AXON/Emitter' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const inherit = require( 'PHET_CORE/inherit' );
const Property = require( 'AXON/Property' );
const Vector2 = require( 'DOT/Vector2' );
const Vector2Property = require( 'DOT/Vector2Property' );

// constants
var COIN_TERM_FADE_TIME = 0.75; // in seconds
Expand Down
14 changes: 7 additions & 7 deletions js/common/model/CoinTermFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var CoinTerm = require( 'EXPRESSION_EXCHANGE/common/model/CoinTerm' );
var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var inherit = require( 'PHET_CORE/inherit' );
var Property = require( 'AXON/Property' );
const CoinTerm = require( 'EXPRESSION_EXCHANGE/common/model/CoinTerm' );
const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const inherit = require( 'PHET_CORE/inherit' );
const Property = require( 'AXON/Property' );

// constants
var CONSTANT_ONE_VALUE_PROPERTY = new Property( 1 );
Expand Down
26 changes: 13 additions & 13 deletions js/common/model/Expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AnimationSpec = require( 'EXPRESSION_EXCHANGE/common/model/AnimationSpec' );
var Bounds2 = require( 'DOT/Bounds2' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var Easing = require( 'TWIXT/Easing' );
var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
var Emitter = require( 'AXON/Emitter' );
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var inherit = require( 'PHET_CORE/inherit' );
var ObservableArray = require( 'AXON/ObservableArray' );
var Property = require( 'AXON/Property' );
var Vector2 = require( 'DOT/Vector2' );
var Vector2Property = require( 'DOT/Vector2Property' );
const AnimationSpec = require( 'EXPRESSION_EXCHANGE/common/model/AnimationSpec' );
const Bounds2 = require( 'DOT/Bounds2' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const Easing = require( 'TWIXT/Easing' );
const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
const Emitter = require( 'AXON/Emitter' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const inherit = require( 'PHET_CORE/inherit' );
const ObservableArray = require( 'AXON/ObservableArray' );
const Property = require( 'AXON/Property' );
const Vector2 = require( 'DOT/Vector2' );
const Vector2Property = require( 'DOT/Vector2Property' );

// constants
var INTER_COIN_TERM_SPACING = 30; // in model units, empirically determined
Expand Down
6 changes: 3 additions & 3 deletions js/common/model/ExpressionHint.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var inherit = require( 'PHET_CORE/inherit' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @param {CoinTerm} anchorCoinTerm - the coin term that is staying put as this expression is being formed
Expand Down
28 changes: 14 additions & 14 deletions js/common/model/ExpressionManipulationModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' );
var Bounds2 = require( 'DOT/Bounds2' );
var CoinTermFactory = require( 'EXPRESSION_EXCHANGE/common/model/CoinTermFactory' );
var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' );
var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
var Expression = require( 'EXPRESSION_EXCHANGE/common/model/Expression' );
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var ExpressionHint = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionHint' );
var inherit = require( 'PHET_CORE/inherit' );
var ObservableArray = require( 'AXON/ObservableArray' );
var Property = require( 'AXON/Property' );
var Vector2 = require( 'DOT/Vector2' );
var ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' );
const AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' );
const Bounds2 = require( 'DOT/Bounds2' );
const CoinTermFactory = require( 'EXPRESSION_EXCHANGE/common/model/CoinTermFactory' );
const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' );
const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
const Expression = require( 'EXPRESSION_EXCHANGE/common/model/Expression' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const ExpressionHint = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionHint' );
const inherit = require( 'PHET_CORE/inherit' );
const ObservableArray = require( 'AXON/ObservableArray' );
const Property = require( 'AXON/Property' );
const Vector2 = require( 'DOT/Vector2' );
const ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' );

// constants
var BREAK_APART_SPACING = 10;
Expand Down
26 changes: 13 additions & 13 deletions js/common/view/AbstractCoinTermNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Bounds2 = require( 'DOT/Bounds2' );
var BreakApartButton = require( 'EXPRESSION_EXCHANGE/common/view/BreakApartButton' );
var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var inherit = require( 'PHET_CORE/inherit' );
var MovableDragHandler = require( 'SCENERY_PHET/input/MovableDragHandler' );
var Node = require( 'SCENERY/nodes/Node' );
var Property = require( 'AXON/Property' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var timer = require( 'AXON/timer' );
var Touch = require( 'SCENERY/input/Touch' );
var Vector2 = require( 'DOT/Vector2' );
const Bounds2 = require( 'DOT/Bounds2' );
const BreakApartButton = require( 'EXPRESSION_EXCHANGE/common/view/BreakApartButton' );
const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const inherit = require( 'PHET_CORE/inherit' );
const MovableDragHandler = require( 'SCENERY_PHET/input/MovableDragHandler' );
const Node = require( 'SCENERY/nodes/Node' );
const Property = require( 'AXON/Property' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const timer = require( 'AXON/timer' );
const Touch = require( 'SCENERY/input/Touch' );
const Vector2 = require( 'DOT/Vector2' );

// constants
var BACKGROUND_CORNER_ROUNDING = 5;
Expand Down
12 changes: 6 additions & 6 deletions js/common/view/BreakApartButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* button used for breaking things apart, supports a normal and color inverted appearance
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
var FontAwesomeNode = require( 'SUN/FontAwesomeNode' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );
const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' );
const FontAwesomeNode = require( 'SUN/FontAwesomeNode' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );

// constants
var MARGIN = 3.5;
Expand Down
Loading

0 comments on commit ee03aad

Please sign in to comment.