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 38cd224 commit ede88b3
Show file tree
Hide file tree
Showing 13 changed files with 75 additions and 75 deletions.
8 changes: 4 additions & 4 deletions js/energy-skate-park-basics-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

var EnergySkateParkBasicsSim = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/EnergySkateParkBasicsSim' );
var SimLauncher = require( 'JOIST/SimLauncher' );
var Tandem = require( 'TANDEM/Tandem' );
const EnergySkateParkBasicsSim = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/EnergySkateParkBasicsSim' );
const SimLauncher = require( 'JOIST/SimLauncher' );
const Tandem = require( 'TANDEM/Tandem' );

// constants
var tandem = Tandem.rootTandem;
Expand Down
8 changes: 4 additions & 4 deletions js/energy-skate-park-basics/Constants.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 Dimension2 = require( 'DOT/Dimension2' );
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var Range = require( 'DOT/Range' );
const Dimension2 = require( 'DOT/Dimension2' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const Range = require( 'DOT/Range' );

var minMass = 25; // kg
var maxMass = 100;
Expand Down
16 changes: 8 additions & 8 deletions js/energy-skate-park-basics/EnergySkateParkBasicsSim.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var EnergySkateParkSim = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/EnergySkateParkSim' );
var FrictionScreen = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/friction/FrictionScreen' );
var inherit = require( 'PHET_CORE/inherit' );
var IntroScreen = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/intro/IntroScreen' );
var PlaygroundScreen = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/playground/PlaygroundScreen' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const EnergySkateParkSim = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/EnergySkateParkSim' );
const FrictionScreen = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/friction/FrictionScreen' );
const inherit = require( 'PHET_CORE/inherit' );
const IntroScreen = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/intro/IntroScreen' );
const PlaygroundScreen = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/playground/PlaygroundScreen' );

// strings
var energySkateParkBasicsTitleString = require( 'string!ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics.title' );
const energySkateParkBasicsTitleString = require( 'string!ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics.title' );

/**
* @param {Tandem} tandem
Expand Down
20 changes: 10 additions & 10 deletions js/energy-skate-park-basics/friction/FrictionScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
*
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var FrictionModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/friction/model/FrictionModel' );
var FrictionScreenView = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/friction/view/FrictionScreenView' );
var Image = require( 'SCENERY/nodes/Image' );
var inherit = require( 'PHET_CORE/inherit' );
var Screen = require( 'JOIST/Screen' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const FrictionModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/friction/model/FrictionModel' );
const FrictionScreenView = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/friction/view/FrictionScreenView' );
const Image = require( 'SCENERY/nodes/Image' );
const inherit = require( 'PHET_CORE/inherit' );
const Screen = require( 'JOIST/Screen' );

// images
var iconFrictionHomescreen = require( 'image!ENERGY_SKATE_PARK/icon-friction-homescreen.png' );
var iconFrictionNavbar = require( 'image!ENERGY_SKATE_PARK/icon-friction-navbar.png' );
const iconFrictionHomescreen = require( 'image!ENERGY_SKATE_PARK/icon-friction-homescreen.png' );
const iconFrictionNavbar = require( 'image!ENERGY_SKATE_PARK/icon-friction-navbar.png' );

// strings
var screenFrictionString = require( 'string!ENERGY_SKATE_PARK_BASICS/screen.friction' );
const screenFrictionString = require( 'string!ENERGY_SKATE_PARK_BASICS/screen.friction' );

/**
* @param {Tandem} tandem
Expand Down
6 changes: 3 additions & 3 deletions js/energy-skate-park-basics/friction/model/FrictionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ define( require => {
'use strict';

// modules
var Constants = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/Constants' );
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var EnergySkateParkBasicsTrackSetModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/common/model/EnergySkateParkBasicsTrackSetModel' );
const Constants = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/Constants' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const EnergySkateParkBasicsTrackSetModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/common/model/EnergySkateParkBasicsTrackSetModel' );

/**
* @param {Tandem} tandem
Expand Down
12 changes: 6 additions & 6 deletions js/energy-skate-park-basics/friction/view/FrictionScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var EnergySkateParkScreenView = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/EnergySkateParkScreenView' );
var FrictionSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/FrictionSlider' );
var MassSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/MassSlider' );
var inherit = require( 'PHET_CORE/inherit' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const EnergySkateParkScreenView = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/EnergySkateParkScreenView' );
const FrictionSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/FrictionSlider' );
const MassSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/MassSlider' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @param {FrictionModel} model
Expand Down
20 changes: 10 additions & 10 deletions js/energy-skate-park-basics/intro/IntroScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
*
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var Image = require( 'SCENERY/nodes/Image' );
var inherit = require( 'PHET_CORE/inherit' );
var IntroModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/intro/model/IntroModel' );
var IntroScreenView = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/intro/view/IntroScreenView' );
var Screen = require( 'JOIST/Screen' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const Image = require( 'SCENERY/nodes/Image' );
const inherit = require( 'PHET_CORE/inherit' );
const IntroModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/intro/model/IntroModel' );
const IntroScreenView = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/intro/view/IntroScreenView' );
const Screen = require( 'JOIST/Screen' );

// images
var iconIntroHomescreen = require( 'image!ENERGY_SKATE_PARK/icon-intro-homescreen.png' );
var iconIntroNavbar = require( 'image!ENERGY_SKATE_PARK/icon-intro-navbar.png' );
const iconIntroHomescreen = require( 'image!ENERGY_SKATE_PARK/icon-intro-homescreen.png' );
const iconIntroNavbar = require( 'image!ENERGY_SKATE_PARK/icon-intro-navbar.png' );

// strings
var screenIntroductionString = require( 'string!ENERGY_SKATE_PARK_BASICS/screen.introduction' );
const screenIntroductionString = require( 'string!ENERGY_SKATE_PARK_BASICS/screen.introduction' );

/**
* @param {Tandem} tandem
Expand Down
6 changes: 3 additions & 3 deletions js/energy-skate-park-basics/intro/model/IntroModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ define( require => {
'use strict';

// modules
var Constants = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/Constants' );
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var EnergySkateParkBasicsTrackSetModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/common/model/EnergySkateParkBasicsTrackSetModel' );
const Constants = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/Constants' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const EnergySkateParkBasicsTrackSetModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/common/model/EnergySkateParkBasicsTrackSetModel' );

/**
* @param {Tandem} tandem
Expand Down
10 changes: 5 additions & 5 deletions js/energy-skate-park-basics/intro/view/IntroScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
*
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var MassSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/MassSlider' );
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var EnergySkateParkScreenView = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/EnergySkateParkScreenView' );
var inherit = require( 'PHET_CORE/inherit' );
const MassSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/MassSlider' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const EnergySkateParkScreenView = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/EnergySkateParkScreenView' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @param {IntroModel} model
Expand Down
20 changes: 10 additions & 10 deletions js/energy-skate-park-basics/playground/PlaygroundScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
*
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var Image = require( 'SCENERY/nodes/Image' );
var inherit = require( 'PHET_CORE/inherit' );
var PlaygroundModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/playground/model/PlaygroundModel' );
var PlaygroundScreenView = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/playground/view/PlaygroundScreenView' );
var Screen = require( 'JOIST/Screen' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const Image = require( 'SCENERY/nodes/Image' );
const inherit = require( 'PHET_CORE/inherit' );
const PlaygroundModel = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/playground/model/PlaygroundModel' );
const PlaygroundScreenView = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/playground/view/PlaygroundScreenView' );
const Screen = require( 'JOIST/Screen' );

// images
var iconPlaygroundHomescreen = require( 'image!ENERGY_SKATE_PARK/icon-playground-homescreen.png' );
var iconPlaygroundNavbar = require( 'image!ENERGY_SKATE_PARK/icon-playground-navbar.png' );
const iconPlaygroundHomescreen = require( 'image!ENERGY_SKATE_PARK/icon-playground-homescreen.png' );
const iconPlaygroundNavbar = require( 'image!ENERGY_SKATE_PARK/icon-playground-navbar.png' );

// strings
var screenTrackPlaygroundString = require( 'string!ENERGY_SKATE_PARK_BASICS/screen.trackPlayground' );
const screenTrackPlaygroundString = require( 'string!ENERGY_SKATE_PARK_BASICS/screen.trackPlayground' );

/**
* @param {Tandem} tandem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ define( require => {
'use strict';

// modules
var Constants = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/Constants' );
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var EnergySkateParkPlaygroundModel = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/model/EnergySkateParkPlaygroundModel' );
var inherit = require( 'PHET_CORE/inherit' );
const Constants = require( 'ENERGY_SKATE_PARK_BASICS/energy-skate-park-basics/Constants' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const EnergySkateParkPlaygroundModel = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/model/EnergySkateParkPlaygroundModel' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @param {Tandem} tandem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
var EnergySkateParkPlaygroundScreenView = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/EnergySkateParkPlaygroundScreenView' );
var FrictionSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/FrictionSlider' );
var MassSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/MassSlider' );
var inherit = require( 'PHET_CORE/inherit' );
const energySkateParkBasics = require( 'ENERGY_SKATE_PARK_BASICS/energySkateParkBasics' );
const EnergySkateParkPlaygroundScreenView = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/EnergySkateParkPlaygroundScreenView' );
const FrictionSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/FrictionSlider' );
const MassSlider = require( 'ENERGY_SKATE_PARK/energy-skate-park/common/view/MassSlider' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @param {PlaygroundModel} model
Expand Down
4 changes: 2 additions & 2 deletions js/energySkateParkBasics.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 Namespace = require( 'PHET_CORE/Namespace' );
const Namespace = require( 'PHET_CORE/Namespace' );

return new Namespace( 'energySkateParkBasics' );
} );

0 comments on commit ede88b3

Please sign in to comment.