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 eda4c81 commit 86fd61a
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 98 deletions.
18 changes: 9 additions & 9 deletions js/function-builder-basics-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var FBBMysteryScreen = require( 'FUNCTION_BUILDER_BASICS/mystery/FBBMysteryScreen' );
var FBQueryParameters = require( 'FUNCTION_BUILDER/common/FBQueryParameters' );
var PatternsScreen = require( 'FUNCTION_BUILDER/patterns/PatternsScreen' );
var Sim = require( 'JOIST/Sim' );
var SimLauncher = require( 'JOIST/SimLauncher' );
var Tandem = require( 'TANDEM/Tandem' );
var TestScreen = require( 'FUNCTION_BUILDER/test/TestScreen' );
const FBBMysteryScreen = require( 'FUNCTION_BUILDER_BASICS/mystery/FBBMysteryScreen' );
const FBQueryParameters = require( 'FUNCTION_BUILDER/common/FBQueryParameters' );
const PatternsScreen = require( 'FUNCTION_BUILDER/patterns/PatternsScreen' );
const Sim = require( 'JOIST/Sim' );
const SimLauncher = require( 'JOIST/SimLauncher' );
const Tandem = require( 'TANDEM/Tandem' );
const TestScreen = require( 'FUNCTION_BUILDER/test/TestScreen' );

// strings
var functionBuilderBasicsTitleString = require( 'string!FUNCTION_BUILDER_BASICS/function-builder-basics.title' );
const functionBuilderBasicsTitleString = require( 'string!FUNCTION_BUILDER_BASICS/function-builder-basics.title' );

// constants
var tandem = Tandem.rootTandem;
Expand Down
4 changes: 2 additions & 2 deletions js/functionBuilderBasics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

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

return new Namespace( 'functionBuilderBasics' );
} );
20 changes: 10 additions & 10 deletions js/mystery/FBBMysteryScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var FBBMysteryModel = require( 'FUNCTION_BUILDER_BASICS/mystery/model/FBBMysteryModel' );
var FBBMysteryScreenView = require( 'FUNCTION_BUILDER_BASICS/mystery/view/FBBMysteryScreenView' );
var FBColors = require( 'FUNCTION_BUILDER/common/FBColors' );
var FBIconFactory = require( 'FUNCTION_BUILDER/common/view/FBIconFactory' );
var functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
var inherit = require( 'PHET_CORE/inherit' );
var Property = require( 'AXON/Property' );
var Screen = require( 'JOIST/Screen' );
const FBBMysteryModel = require( 'FUNCTION_BUILDER_BASICS/mystery/model/FBBMysteryModel' );
const FBBMysteryScreenView = require( 'FUNCTION_BUILDER_BASICS/mystery/view/FBBMysteryScreenView' );
const FBColors = require( 'FUNCTION_BUILDER/common/FBColors' );
const FBIconFactory = require( 'FUNCTION_BUILDER/common/view/FBIconFactory' );
const functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
const inherit = require( 'PHET_CORE/inherit' );
const Property = require( 'AXON/Property' );
const Screen = require( 'JOIST/Screen' );

// strings
var screenMysteryString = require( 'string!FUNCTION_BUILDER/screen.mystery' );
const screenMysteryString = require( 'string!FUNCTION_BUILDER/screen.mystery' );

/**
* @param {Tandem} tandem
Expand Down
22 changes: 11 additions & 11 deletions js/mystery/model/FBBMysteryChallenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
const functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );

// function modules
var Erase = require( 'FUNCTION_BUILDER/patterns/model/functions/Erase' );
var Grayscale = require( 'FUNCTION_BUILDER/patterns/model/functions/Grayscale' );
var Identity = require( 'FUNCTION_BUILDER/patterns/model/functions/Identity' );
var InvertRGB = require( 'FUNCTION_BUILDER/patterns/model/functions/InvertRGB' );
var Mirror = require( 'FUNCTION_BUILDER/patterns/model/functions/Mirror' );
var Rotate180 = require( 'FUNCTION_BUILDER/patterns/model/functions/Rotate180' );
var Rotate90 = require( 'FUNCTION_BUILDER/patterns/model/functions/Rotate90' );
var Shrink = require( 'FUNCTION_BUILDER/patterns/model/functions/Shrink' );
var Warhol = require( 'FUNCTION_BUILDER/patterns/model/functions/Warhol' );
const Erase = require( 'FUNCTION_BUILDER/patterns/model/functions/Erase' );
const Grayscale = require( 'FUNCTION_BUILDER/patterns/model/functions/Grayscale' );
const Identity = require( 'FUNCTION_BUILDER/patterns/model/functions/Identity' );
const InvertRGB = require( 'FUNCTION_BUILDER/patterns/model/functions/InvertRGB' );
const Mirror = require( 'FUNCTION_BUILDER/patterns/model/functions/Mirror' );
const Rotate180 = require( 'FUNCTION_BUILDER/patterns/model/functions/Rotate180' );
const Rotate90 = require( 'FUNCTION_BUILDER/patterns/model/functions/Rotate90' );
const Shrink = require( 'FUNCTION_BUILDER/patterns/model/functions/Shrink' );
const Warhol = require( 'FUNCTION_BUILDER/patterns/model/functions/Warhol' );

var FBBMysteryChallenges = {

Expand Down
12 changes: 6 additions & 6 deletions js/mystery/model/FBBMysteryModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var FBBMysteryChallenges = require( 'FUNCTION_BUILDER_BASICS/mystery/model/FBBMysteryChallenges' );
var FBBMysteryScene = require( 'FUNCTION_BUILDER_BASICS/mystery/model/FBBMysteryScene' );
var FBModel = require( 'FUNCTION_BUILDER/common/model/FBModel' );
var functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
var inherit = require( 'PHET_CORE/inherit' );
const FBBMysteryChallenges = require( 'FUNCTION_BUILDER_BASICS/mystery/model/FBBMysteryChallenges' );
const FBBMysteryScene = require( 'FUNCTION_BUILDER_BASICS/mystery/model/FBBMysteryScene' );
const FBModel = require( 'FUNCTION_BUILDER/common/model/FBModel' );
const functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @constructor
Expand Down
66 changes: 33 additions & 33 deletions js/mystery/model/FBBMysteryScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,46 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Builder = require( 'FUNCTION_BUILDER/common/model/builder/Builder' );
var FBConstants = require( 'FUNCTION_BUILDER/common/FBConstants' );
var FBIconFactory = require( 'FUNCTION_BUILDER/common/view/FBIconFactory' );
var FBQueryParameters = require( 'FUNCTION_BUILDER/common/FBQueryParameters' );
var functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
var FunctionCreator = require( 'FUNCTION_BUILDER/common/model/functions/FunctionCreator' );
var inherit = require( 'PHET_CORE/inherit' );
var MysteryChallenges = require( 'FUNCTION_BUILDER/mystery/model/MysteryChallenges' );
var Property = require( 'AXON/Property' );
var Scene = require( 'FUNCTION_BUILDER/common/model/Scene' );
var Vector2 = require( 'DOT/Vector2' );
const Builder = require( 'FUNCTION_BUILDER/common/model/builder/Builder' );
const FBConstants = require( 'FUNCTION_BUILDER/common/FBConstants' );
const FBIconFactory = require( 'FUNCTION_BUILDER/common/view/FBIconFactory' );
const FBQueryParameters = require( 'FUNCTION_BUILDER/common/FBQueryParameters' );
const functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
const FunctionCreator = require( 'FUNCTION_BUILDER/common/model/functions/FunctionCreator' );
const inherit = require( 'PHET_CORE/inherit' );
const MysteryChallenges = require( 'FUNCTION_BUILDER/mystery/model/MysteryChallenges' );
const Property = require( 'AXON/Property' );
const Scene = require( 'FUNCTION_BUILDER/common/model/Scene' );
const Vector2 = require( 'DOT/Vector2' );

// function modules
var Erase = require( 'FUNCTION_BUILDER/patterns/model/functions/Erase' );
var Grayscale = require( 'FUNCTION_BUILDER/patterns/model/functions/Grayscale' );
var Identity = require( 'FUNCTION_BUILDER/patterns/model/functions/Identity' );
var InvertRGB = require( 'FUNCTION_BUILDER/patterns/model/functions/InvertRGB' );
var Mirror = require( 'FUNCTION_BUILDER/patterns/model/functions/Mirror' );
var Rotate180 = require( 'FUNCTION_BUILDER/patterns/model/functions/Rotate180' );
var Rotate90 = require( 'FUNCTION_BUILDER/patterns/model/functions/Rotate90' );
var Shrink = require( 'FUNCTION_BUILDER/patterns/model/functions/Shrink' );
var Warhol = require( 'FUNCTION_BUILDER/patterns/model/functions/Warhol' );
const Erase = require( 'FUNCTION_BUILDER/patterns/model/functions/Erase' );
const Grayscale = require( 'FUNCTION_BUILDER/patterns/model/functions/Grayscale' );
const Identity = require( 'FUNCTION_BUILDER/patterns/model/functions/Identity' );
const InvertRGB = require( 'FUNCTION_BUILDER/patterns/model/functions/InvertRGB' );
const Mirror = require( 'FUNCTION_BUILDER/patterns/model/functions/Mirror' );
const Rotate180 = require( 'FUNCTION_BUILDER/patterns/model/functions/Rotate180' );
const Rotate90 = require( 'FUNCTION_BUILDER/patterns/model/functions/Rotate90' );
const Shrink = require( 'FUNCTION_BUILDER/patterns/model/functions/Shrink' );
const Warhol = require( 'FUNCTION_BUILDER/patterns/model/functions/Warhol' );

// card images
var beakerImage = require( 'image!FUNCTION_BUILDER/cards/beaker.png' );
var butterflyImage = require( 'image!FUNCTION_BUILDER/cards/butterfly.png' );
var cherriesImage = require( 'image!FUNCTION_BUILDER/cards/cherries.png' );
var circleImage = require( 'image!FUNCTION_BUILDER/cards/circle.png' );
var feetImage = require( 'image!FUNCTION_BUILDER/cards/feet.png' );
var planetImage = require( 'image!FUNCTION_BUILDER/cards/planet.png' );
var rectangleImage = require( 'image!FUNCTION_BUILDER/cards/rectangle.png' );
var snowflakeImage = require( 'image!FUNCTION_BUILDER/cards/snowflake.png' );
var starImage = require( 'image!FUNCTION_BUILDER/cards/star.png' );
var stickFigureImage = require( 'image!FUNCTION_BUILDER/cards/stickFigure.png' );
var sunImage = require( 'image!FUNCTION_BUILDER/cards/sun.png' );
var triangleImage = require( 'image!FUNCTION_BUILDER/cards/triangle.png' );
const beakerImage = require( 'image!FUNCTION_BUILDER/cards/beaker.png' );
const butterflyImage = require( 'image!FUNCTION_BUILDER/cards/butterfly.png' );
const cherriesImage = require( 'image!FUNCTION_BUILDER/cards/cherries.png' );
const circleImage = require( 'image!FUNCTION_BUILDER/cards/circle.png' );
const feetImage = require( 'image!FUNCTION_BUILDER/cards/feet.png' );
const planetImage = require( 'image!FUNCTION_BUILDER/cards/planet.png' );
const rectangleImage = require( 'image!FUNCTION_BUILDER/cards/rectangle.png' );
const snowflakeImage = require( 'image!FUNCTION_BUILDER/cards/snowflake.png' );
const starImage = require( 'image!FUNCTION_BUILDER/cards/star.png' );
const stickFigureImage = require( 'image!FUNCTION_BUILDER/cards/stickFigure.png' );
const sunImage = require( 'image!FUNCTION_BUILDER/cards/sun.png' );
const triangleImage = require( 'image!FUNCTION_BUILDER/cards/triangle.png' );

/**
* @param {ImageFunction[][]} challengePool
Expand Down
14 changes: 7 additions & 7 deletions js/mystery/view/FBBMysteryFunctionNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var FBConstants = require( 'FUNCTION_BUILDER/common/FBConstants' );
var functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
var ImageFunctionNode = require( 'FUNCTION_BUILDER/common/view/functions/ImageFunctionNode' );
var inherit = require( 'PHET_CORE/inherit' );
var Text = require( 'SCENERY/nodes/Text' );
const FBConstants = require( 'FUNCTION_BUILDER/common/FBConstants' );
const functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
const ImageFunctionNode = require( 'FUNCTION_BUILDER/common/view/functions/ImageFunctionNode' );
const inherit = require( 'PHET_CORE/inherit' );
const Text = require( 'SCENERY/nodes/Text' );

// strings
var mysteryCharacterString = require( 'string!FUNCTION_BUILDER/mysteryCharacter' );
const mysteryCharacterString = require( 'string!FUNCTION_BUILDER/mysteryCharacter' );

/**
* @param {MathFunction} functionInstance
Expand Down
30 changes: 15 additions & 15 deletions js/mystery/view/FBBMysterySceneNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var CardContainer = require( 'FUNCTION_BUILDER/common/view/containers/CardContainer' );
var EyeToggleButton = require( 'SCENERY_PHET/buttons/EyeToggleButton' );
var FBBMysteryFunctionNode = require( 'FUNCTION_BUILDER_BASICS/mystery/view/FBBMysteryFunctionNode' );
var FBColors = require( 'FUNCTION_BUILDER/common/FBColors' );
var FBFont = require( 'FUNCTION_BUILDER/common/FBFont' );
var FBQueryParameters = require( 'FUNCTION_BUILDER/common/FBQueryParameters' );
var functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
var ImageCard = require( 'FUNCTION_BUILDER/common/model/cards/ImageCard' );
var ImageCardNode = require( 'FUNCTION_BUILDER/common/view/cards/ImageCardNode' );
var inherit = require( 'PHET_CORE/inherit' );
var RefreshButton = require( 'SCENERY_PHET/buttons/RefreshButton' );
var SceneNode = require( 'FUNCTION_BUILDER/common/view/SceneNode' );
var Text = require( 'SCENERY/nodes/Text' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const CardContainer = require( 'FUNCTION_BUILDER/common/view/containers/CardContainer' );
const EyeToggleButton = require( 'SCENERY_PHET/buttons/EyeToggleButton' );
const FBBMysteryFunctionNode = require( 'FUNCTION_BUILDER_BASICS/mystery/view/FBBMysteryFunctionNode' );
const FBColors = require( 'FUNCTION_BUILDER/common/FBColors' );
const FBFont = require( 'FUNCTION_BUILDER/common/FBFont' );
const FBQueryParameters = require( 'FUNCTION_BUILDER/common/FBQueryParameters' );
const functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
const ImageCard = require( 'FUNCTION_BUILDER/common/model/cards/ImageCard' );
const ImageCardNode = require( 'FUNCTION_BUILDER/common/view/cards/ImageCardNode' );
const inherit = require( 'PHET_CORE/inherit' );
const RefreshButton = require( 'SCENERY_PHET/buttons/RefreshButton' );
const SceneNode = require( 'FUNCTION_BUILDER/common/view/SceneNode' );
const Text = require( 'SCENERY/nodes/Text' );

// constants
var QUESTION_MARK_COLORS = [ 'red', 'rgb( 0, 170, 255 )', 'green', 'orange', 'magenta' ];
Expand Down
10 changes: 5 additions & 5 deletions js/mystery/view/FBBMysteryScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var FBBMysterySceneNode = require( 'FUNCTION_BUILDER_BASICS/mystery/view/FBBMysterySceneNode' );
var FBScreenView = require( 'FUNCTION_BUILDER/common/view/FBScreenView' );
var functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
var inherit = require( 'PHET_CORE/inherit' );
const FBBMysterySceneNode = require( 'FUNCTION_BUILDER_BASICS/mystery/view/FBBMysterySceneNode' );
const FBScreenView = require( 'FUNCTION_BUILDER/common/view/FBScreenView' );
const functionBuilderBasics = require( 'FUNCTION_BUILDER_BASICS/functionBuilderBasics' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @param {MysteryModel} model
Expand Down

0 comments on commit 86fd61a

Please sign in to comment.