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 4c78e15 commit 7cb765e
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 106 deletions.
10 changes: 5 additions & 5 deletions js/fraction-comparison-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

var IntroScreen = require( 'FRACTION_COMPARISON/intro/IntroScreen' );
var Sim = require( 'JOIST/Sim' );
var SimLauncher = require( 'JOIST/SimLauncher' );
const IntroScreen = require( 'FRACTION_COMPARISON/intro/IntroScreen' );
const Sim = require( 'JOIST/Sim' );
const SimLauncher = require( 'JOIST/SimLauncher' );

// strings
var fractionComparisonTitleString = require( 'string!FRACTION_COMPARISON/fraction-comparison.title' );
const fractionComparisonTitleString = require( 'string!FRACTION_COMPARISON/fraction-comparison.title' );

var simOptions = {
credits: {
Expand Down
4 changes: 2 additions & 2 deletions js/fractionComparison.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
/**
* Creates the namespace for this simulation.
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Namespace = require( 'PHET_CORE/Namespace' );
const Namespace = require( 'PHET_CORE/Namespace' );

return new Namespace( 'fractionComparison' );
} );
16 changes: 8 additions & 8 deletions js/intro/IntroScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var inherit = require( 'PHET_CORE/inherit' );
var IntroModel = require( 'FRACTION_COMPARISON/intro/model/IntroModel' );
var IntroView = require( 'FRACTION_COMPARISON/intro/view/IntroView' );
var ModelViewTransform2 = require( 'PHETCOMMON/view/ModelViewTransform2' );
var Property = require( 'AXON/Property' );
var Screen = require( 'JOIST/Screen' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const inherit = require( 'PHET_CORE/inherit' );
const IntroModel = require( 'FRACTION_COMPARISON/intro/model/IntroModel' );
const IntroView = require( 'FRACTION_COMPARISON/intro/view/IntroView' );
const ModelViewTransform2 = require( 'PHETCOMMON/view/ModelViewTransform2' );
const Property = require( 'AXON/Property' );
const Screen = require( 'JOIST/Screen' );

function IntroScreen() {
Screen.call( this,
Expand Down
14 changes: 7 additions & 7 deletions js/intro/model/FractionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberProperty = require( 'AXON/NumberProperty' );
var StringProperty = require( 'AXON/StringProperty' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const inherit = require( 'PHET_CORE/inherit' );
const NumberProperty = require( 'AXON/NumberProperty' );
const StringProperty = require( 'AXON/StringProperty' );

// constants
var VALID_STATE_VALUES = [ 'start', 'dragging', 'compare' ];
Expand Down
14 changes: 7 additions & 7 deletions js/intro/model/IntroModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var FractionModel = require( 'FRACTION_COMPARISON/intro/model/FractionModel' );
var inherit = require( 'PHET_CORE/inherit' );
var StringProperty = require( 'AXON/StringProperty' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const FractionModel = require( 'FRACTION_COMPARISON/intro/model/FractionModel' );
const inherit = require( 'PHET_CORE/inherit' );
const StringProperty = require( 'AXON/StringProperty' );

// constants
var VALID_REPRESENTATION_VALUES = [
Expand Down
22 changes: 11 additions & 11 deletions js/intro/view/CompareSeparateButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Color = require( 'SCENERY/util/Color' );
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var HBox = require( 'SCENERY/nodes/HBox' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var Path = require( 'SCENERY/nodes/Path' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );
var Shape = require( 'KITE/Shape' );
var Vector2 = require( 'DOT/Vector2' );
const Color = require( 'SCENERY/util/Color' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const HBox = require( 'SCENERY/nodes/HBox' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' );
const Shape = require( 'KITE/Shape' );
const Vector2 = require( 'DOT/Vector2' );

/**
* @param {Function} compareButtonPressed
Expand Down
10 changes: 5 additions & 5 deletions js/intro/view/ComparisonRegion.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var CompareSeparateButton = require( 'FRACTION_COMPARISON/intro/view/CompareSeparateButton' );
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var inherit = require( 'PHET_CORE/inherit' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
const CompareSeparateButton = require( 'FRACTION_COMPARISON/intro/view/CompareSeparateButton' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const inherit = require( 'PHET_CORE/inherit' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );

/**
*
Expand Down
20 changes: 10 additions & 10 deletions js/intro/view/FractionNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var DerivedProperty = require( 'AXON/DerivedProperty' );
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var inherit = require( 'PHET_CORE/inherit' );
var Line = require( 'SCENERY/nodes/Line' );
var Node = require( 'SCENERY/nodes/Node' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var Text = require( 'SCENERY/nodes/Text' );
var UpDownSpinner = require( 'SCENERY_PHET/UpDownSpinner' );
var VBox = require( 'SCENERY/nodes/VBox' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const inherit = require( 'PHET_CORE/inherit' );
const Line = require( 'SCENERY/nodes/Line' );
const Node = require( 'SCENERY/nodes/Node' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const Text = require( 'SCENERY/nodes/Text' );
const UpDownSpinner = require( 'SCENERY_PHET/UpDownSpinner' );
const VBox = require( 'SCENERY/nodes/VBox' );

/**
*
Expand Down
20 changes: 10 additions & 10 deletions js/intro/view/HorizontalBarContainerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Animation = require( 'TWIXT/Animation' );
var Easing = require( 'TWIXT/Easing' );
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var inherit = require( 'PHET_CORE/inherit' );
var Line = require( 'SCENERY/nodes/Line' );
var Node = require( 'SCENERY/nodes/Node' );
var NodeDragHandler = require( 'FRACTION_COMPARISON/intro/view/NodeDragHandler' );
var Property = require( 'AXON/Property' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Animation = require( 'TWIXT/Animation' );
const Easing = require( 'TWIXT/Easing' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const inherit = require( 'PHET_CORE/inherit' );
const Line = require( 'SCENERY/nodes/Line' );
const Node = require( 'SCENERY/nodes/Node' );
const NodeDragHandler = require( 'FRACTION_COMPARISON/intro/view/NodeDragHandler' );
const Property = require( 'AXON/Property' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );

/**
*
Expand Down
34 changes: 17 additions & 17 deletions js/intro/view/IntroView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Bounds2 = require( 'DOT/Bounds2' );
var Checkbox = require( 'SUN/Checkbox' );
var ComparisonRegion = require( 'FRACTION_COMPARISON/intro/view/ComparisonRegion' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var FractionNode = require( 'FRACTION_COMPARISON/intro/view/FractionNode' );
var HorizontalBarContainerNode = require( 'FRACTION_COMPARISON/intro/view/HorizontalBarContainerNode' );
var inherit = require( 'PHET_CORE/inherit' );
var LeftRightSpinner = require( 'SCENERY_PHET/LeftRightSpinner' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' );
var ScreenView = require( 'JOIST/ScreenView' );
var Vector2 = require( 'DOT/Vector2' );

var NumberLineNode = require( 'FRACTION_COMPARISON/intro/view/NumberLineNode' );
var RepresentationPanel = require( 'FRACTION_COMPARISON/intro/view/RepresentationPanel' );
const Bounds2 = require( 'DOT/Bounds2' );
const Checkbox = require( 'SUN/Checkbox' );
const ComparisonRegion = require( 'FRACTION_COMPARISON/intro/view/ComparisonRegion' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const FractionNode = require( 'FRACTION_COMPARISON/intro/view/FractionNode' );
const HorizontalBarContainerNode = require( 'FRACTION_COMPARISON/intro/view/HorizontalBarContainerNode' );
const inherit = require( 'PHET_CORE/inherit' );
const LeftRightSpinner = require( 'SCENERY_PHET/LeftRightSpinner' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' );
const ScreenView = require( 'JOIST/ScreenView' );
const Vector2 = require( 'DOT/Vector2' );

const NumberLineNode = require( 'FRACTION_COMPARISON/intro/view/NumberLineNode' );
const RepresentationPanel = require( 'FRACTION_COMPARISON/intro/view/RepresentationPanel' );

/***
* @param {IntroModel} model
Expand Down
10 changes: 5 additions & 5 deletions js/intro/view/NodeDragHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
* @author Chris Malley (PixelZoom, Inc.)
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var inherit = require( 'PHET_CORE/inherit' );
var SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
var Vector2 = require( 'DOT/Vector2' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const inherit = require( 'PHET_CORE/inherit' );
const SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
const Vector2 = require( 'DOT/Vector2' );

/**
* @param {Node} node
Expand Down
22 changes: 11 additions & 11 deletions js/intro/view/NumberLineNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
*
* @author Sam Reid
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var DerivedProperty = require( 'AXON/DerivedProperty' );
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var FractionNode = require( 'FRACTION_COMPARISON/intro/view/FractionNode' );
var inherit = require( 'PHET_CORE/inherit' );
var Line = require( 'SCENERY/nodes/Line' );
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 DerivedProperty = require( 'AXON/DerivedProperty' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const FractionNode = require( 'FRACTION_COMPARISON/intro/view/FractionNode' );
const inherit = require( 'PHET_CORE/inherit' );
const Line = require( 'SCENERY/nodes/Line' );
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' );

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

// modules
var Circle = require( 'SCENERY/nodes/Circle' );
var fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var Panel = require( 'SUN/Panel' );
var RadioButtonGroup = require( 'SUN/buttons/RadioButtonGroup' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Circle = require( 'SCENERY/nodes/Circle' );
const fractionComparison = require( 'FRACTION_COMPARISON/fractionComparison' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const Panel = require( 'SUN/Panel' );
const RadioButtonGroup = require( 'SUN/buttons/RadioButtonGroup' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );

// constants
var ICON_SCALE = 0.75;
Expand Down

0 comments on commit 7cb765e

Please sign in to comment.