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 2d23488 commit 9a61a87
Show file tree
Hide file tree
Showing 74 changed files with 658 additions and 658 deletions.
24 changes: 12 additions & 12 deletions js/capacitance/CapacitanceScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
*
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var CapacitanceModel = require( 'CAPACITOR_LAB_BASICS/capacitance/model/CapacitanceModel' );
var CapacitanceScreenView = require( 'CAPACITOR_LAB_BASICS/capacitance/view/CapacitanceScreenView' );
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
var CLBModelViewTransform3D = require( 'CAPACITOR_LAB_BASICS/common/model/CLBModelViewTransform3D' );
var Image = require( 'SCENERY/nodes/Image' );
var inherit = require( 'PHET_CORE/inherit' );
var Property = require( 'AXON/Property' );
var Screen = require( 'JOIST/Screen' );
const CapacitanceModel = require( 'CAPACITOR_LAB_BASICS/capacitance/model/CapacitanceModel' );
const CapacitanceScreenView = require( 'CAPACITOR_LAB_BASICS/capacitance/view/CapacitanceScreenView' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
const CLBModelViewTransform3D = require( 'CAPACITOR_LAB_BASICS/common/model/CLBModelViewTransform3D' );
const Image = require( 'SCENERY/nodes/Image' );
const inherit = require( 'PHET_CORE/inherit' );
const Property = require( 'AXON/Property' );
const Screen = require( 'JOIST/Screen' );

// strings
var screenCapacitanceString = require( 'string!CAPACITOR_LAB_BASICS/screen.capacitance' );
const screenCapacitanceString = require( 'string!CAPACITOR_LAB_BASICS/screen.capacitance' );

// images
var capacitorIconImage = require( 'mipmap!CAPACITOR_LAB_BASICS/capacitance_screen_icon.png' );
const capacitorIconImage = require( 'mipmap!CAPACITOR_LAB_BASICS/capacitance_screen_icon.png' );

/**
* @constructor
Expand Down
10 changes: 5 additions & 5 deletions js/capacitance/model/CapacitanceCircuit.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CircuitState = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitState' );
var inherit = require( 'PHET_CORE/inherit' );
var ParallelCircuit = require( 'CAPACITOR_LAB_BASICS/common/model/ParallelCircuit' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CircuitState = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitState' );
const inherit = require( 'PHET_CORE/inherit' );
const ParallelCircuit = require( 'CAPACITOR_LAB_BASICS/common/model/ParallelCircuit' );

/**
* @constructor
Expand Down
16 changes: 8 additions & 8 deletions js/capacitance/model/CapacitanceModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BarMeter = require( 'CAPACITOR_LAB_BASICS/common/model/meter/BarMeter' );
var CapacitanceCircuit = require( 'CAPACITOR_LAB_BASICS/capacitance/model/CapacitanceCircuit' );
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CircuitConfig = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitConfig' );
var CircuitState = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitState' );
var CLBModel = require( 'CAPACITOR_LAB_BASICS/common/model/CLBModel' );
var inherit = require( 'PHET_CORE/inherit' );
const BarMeter = require( 'CAPACITOR_LAB_BASICS/common/model/meter/BarMeter' );
const CapacitanceCircuit = require( 'CAPACITOR_LAB_BASICS/capacitance/model/CapacitanceCircuit' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CircuitConfig = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitConfig' );
const CircuitState = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitState' );
const CLBModel = require( 'CAPACITOR_LAB_BASICS/common/model/CLBModel' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @constructor
Expand Down
12 changes: 6 additions & 6 deletions js/capacitance/view/CapacitanceCircuitNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* @author Chris Malley (PixelZoom, Inc.)
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CircuitState = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitState' );
var CLBCircuitNode = require( 'CAPACITOR_LAB_BASICS/common/view/CLBCircuitNode' );
var inherit = require( 'PHET_CORE/inherit' );
var Property = require( 'AXON/Property' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CircuitState = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitState' );
const CLBCircuitNode = require( 'CAPACITOR_LAB_BASICS/common/view/CLBCircuitNode' );
const inherit = require( 'PHET_CORE/inherit' );
const Property = require( 'AXON/Property' );

/**
* @constructor
Expand Down
26 changes: 13 additions & 13 deletions js/capacitance/view/CapacitanceScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
* @author Chris Malley (PixelZoom, Inc.)
* @author Jesse Greenberg (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
const Tandem = require( 'TANDEM/Tandem' );
var BarMeterPanel = require( 'CAPACITOR_LAB_BASICS/common/view/BarMeterPanel' );
var CapacitanceCircuitNode = require( 'CAPACITOR_LAB_BASICS/capacitance/view/CapacitanceCircuitNode' );
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CLBViewControlPanel = require( 'CAPACITOR_LAB_BASICS/common/view/control/CLBViewControlPanel' );
var DebugLayer = require( 'CAPACITOR_LAB_BASICS/common/view/DebugLayer' );
var DraggableTimerNode = require( 'CAPACITOR_LAB_BASICS/common/view/drag/DraggableTimerNode' );
var inherit = require( 'PHET_CORE/inherit' );
var ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' );
var ScreenView = require( 'JOIST/ScreenView' );
var Vector2 = require( 'DOT/Vector2' );
var VoltmeterNode = require( 'CAPACITOR_LAB_BASICS/common/view/meters/VoltmeterNode' );
var VoltmeterToolboxPanel = require( 'CAPACITOR_LAB_BASICS/common/view/control/VoltmeterToolboxPanel' );
const BarMeterPanel = require( 'CAPACITOR_LAB_BASICS/common/view/BarMeterPanel' );
const CapacitanceCircuitNode = require( 'CAPACITOR_LAB_BASICS/capacitance/view/CapacitanceCircuitNode' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CLBViewControlPanel = require( 'CAPACITOR_LAB_BASICS/common/view/control/CLBViewControlPanel' );
const DebugLayer = require( 'CAPACITOR_LAB_BASICS/common/view/DebugLayer' );
const DraggableTimerNode = require( 'CAPACITOR_LAB_BASICS/common/view/drag/DraggableTimerNode' );
const inherit = require( 'PHET_CORE/inherit' );
const ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' );
const ScreenView = require( 'JOIST/ScreenView' );
const Vector2 = require( 'DOT/Vector2' );
const VoltmeterNode = require( 'CAPACITOR_LAB_BASICS/common/view/meters/VoltmeterNode' );
const VoltmeterToolboxPanel = require( 'CAPACITOR_LAB_BASICS/common/view/control/VoltmeterToolboxPanel' );

/**
* @constructor
Expand Down
16 changes: 8 additions & 8 deletions js/capacitor-lab-basics-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var CapacitanceScreen = require( 'CAPACITOR_LAB_BASICS/capacitance/CapacitanceScreen' );
var CLBLightBulbScreen = require( 'CAPACITOR_LAB_BASICS/light-bulb/CLBLightBulbScreen' );
var Property = require( 'AXON/Property' );
var Sim = require( 'JOIST/Sim' );
var SimLauncher = require( 'JOIST/SimLauncher' );
var Tandem = require( 'TANDEM/Tandem' );
const CapacitanceScreen = require( 'CAPACITOR_LAB_BASICS/capacitance/CapacitanceScreen' );
const CLBLightBulbScreen = require( 'CAPACITOR_LAB_BASICS/light-bulb/CLBLightBulbScreen' );
const Property = require( 'AXON/Property' );
const Sim = require( 'JOIST/Sim' );
const SimLauncher = require( 'JOIST/SimLauncher' );
const Tandem = require( 'TANDEM/Tandem' );

// strings
var capacitorLabBasicsTitleString = require( 'string!CAPACITOR_LAB_BASICS/capacitor-lab-basics.title' );
const capacitorLabBasicsTitleString = require( 'string!CAPACITOR_LAB_BASICS/capacitor-lab-basics.title' );

// constants
var tandem = Tandem.rootTandem;
Expand Down
4 changes: 2 additions & 2 deletions js/capacitorLabBasics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Jesse Greenberg (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( 'capacitorLabBasics' );
} );
14 changes: 7 additions & 7 deletions js/common/CLBConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var Dimension2 = require( 'DOT/Dimension2' );
var PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
var Range = require( 'DOT/Range' );
var RangeWithValue = require( 'DOT/RangeWithValue' );
var Vector3 = require( 'DOT/Vector3' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const Dimension2 = require( 'DOT/Dimension2' );
const PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
const Range = require( 'DOT/Range' );
const RangeWithValue = require( 'DOT/RangeWithValue' );
const Vector3 = require( 'DOT/Vector3' );

var NEGATIVE = 'NEGATIVE';
var POSITIVE = 'POSITIVE';
Expand Down
4 changes: 2 additions & 2 deletions js/common/CLBQueryParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );

var CLBQueryParameters = QueryStringMachine.getAll( {

Expand Down
22 changes: 11 additions & 11 deletions js/common/model/Battery.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BatteryShapeCreator = require( 'CAPACITOR_LAB_BASICS/common/model/shapes/BatteryShapeCreator' );
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
var Dimension2 = require( 'DOT/Dimension2' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberProperty = require( 'AXON/NumberProperty' );
var Property = require( 'AXON/Property' );
var PropertyIO = require( 'AXON/PropertyIO' );
var StringIO = require( 'TANDEM/types/StringIO' );
var Vector3 = require( 'DOT/Vector3' );
const BatteryShapeCreator = require( 'CAPACITOR_LAB_BASICS/common/model/shapes/BatteryShapeCreator' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
const Dimension2 = require( 'DOT/Dimension2' );
const inherit = require( 'PHET_CORE/inherit' );
const NumberProperty = require( 'AXON/NumberProperty' );
const Property = require( 'AXON/Property' );
const PropertyIO = require( 'AXON/PropertyIO' );
const StringIO = require( 'TANDEM/types/StringIO' );
const Vector3 = require( 'DOT/Vector3' );

// constants
// size of the associated image file, determined by visual inspection
Expand Down
26 changes: 13 additions & 13 deletions js/common/model/CLBModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
var Color = require( 'SCENERY/util/Color' );
var ColorIO = require( 'SCENERY/util/ColorIO' );
var Dimension2 = require( 'DOT/Dimension2' );
var Emitter = require( 'AXON/Emitter' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberProperty = require( 'AXON/NumberProperty' );
var Property = require( 'AXON/Property' );
var PropertyIO = require( 'AXON/PropertyIO' );
var Voltmeter = require( 'CAPACITOR_LAB_BASICS/common/model/meter/Voltmeter' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
const Color = require( 'SCENERY/util/Color' );
const ColorIO = require( 'SCENERY/util/ColorIO' );
const Dimension2 = require( 'DOT/Dimension2' );
const Emitter = require( 'AXON/Emitter' );
const inherit = require( 'PHET_CORE/inherit' );
const NumberProperty = require( 'AXON/NumberProperty' );
const Property = require( 'AXON/Property' );
const PropertyIO = require( 'AXON/PropertyIO' );
const Voltmeter = require( 'CAPACITOR_LAB_BASICS/common/model/meter/Voltmeter' );

// constants
// reference coordinate frame size for world nodes
Expand Down
16 changes: 8 additions & 8 deletions js/common/model/CLBModelViewTransform3D.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
var inherit = require( 'PHET_CORE/inherit' );
var Matrix3 = require( 'DOT/Matrix3' );
var ModelViewTransform2 = require( 'PHETCOMMON/view/ModelViewTransform2' );
var Vector2 = require( 'DOT/Vector2' );
var Vector3 = require( 'DOT/Vector3' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
const inherit = require( 'PHET_CORE/inherit' );
const Matrix3 = require( 'DOT/Matrix3' );
const ModelViewTransform2 = require( 'PHETCOMMON/view/ModelViewTransform2' );
const Vector2 = require( 'DOT/Vector2' );
const Vector3 = require( 'DOT/Vector3' );

// Scratch variable for performance
// @private
Expand Down
32 changes: 16 additions & 16 deletions js/common/model/Capacitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Bounds3 = require( 'DOT/Bounds3' );
var Bounds3IO = require( 'DOT/Bounds3IO' );
var BoxShapeCreator = require( 'CAPACITOR_LAB_BASICS/common/model/shapes/BoxShapeCreator' );
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CircuitLocation = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitLocation' );
var CircuitSwitch = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitSwitch' );
var CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var DerivedPropertyIO = require( 'AXON/DerivedPropertyIO' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberIO = require( 'TANDEM/types/NumberIO' );
var NumberProperty = require( 'AXON/NumberProperty' );
var Property = require( 'AXON/Property' );
var PropertyIO = require( 'AXON/PropertyIO' );
var Vector3 = require( 'DOT/Vector3' );
const Bounds3 = require( 'DOT/Bounds3' );
const Bounds3IO = require( 'DOT/Bounds3IO' );
const BoxShapeCreator = require( 'CAPACITOR_LAB_BASICS/common/model/shapes/BoxShapeCreator' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CircuitLocation = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitLocation' );
const CircuitSwitch = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitSwitch' );
const CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const DerivedPropertyIO = require( 'AXON/DerivedPropertyIO' );
const inherit = require( 'PHET_CORE/inherit' );
const NumberIO = require( 'TANDEM/types/NumberIO' );
const NumberProperty = require( 'AXON/NumberProperty' );
const Property = require( 'AXON/Property' );
const PropertyIO = require( 'AXON/PropertyIO' );
const Vector3 = require( 'DOT/Vector3' );

/**
* @constructor
Expand Down
10 changes: 5 additions & 5 deletions js/common/model/CircuitConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
* @author Jesse Greenberg (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
var CircuitState = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitState' );
var CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
var CLBModelViewTransform3D = require( 'CAPACITOR_LAB_BASICS/common/model/CLBModelViewTransform3D' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const CircuitState = require( 'CAPACITOR_LAB_BASICS/common/model/CircuitState' );
const CLBConstants = require( 'CAPACITOR_LAB_BASICS/common/CLBConstants' );
const CLBModelViewTransform3D = require( 'CAPACITOR_LAB_BASICS/common/model/CLBModelViewTransform3D' );

// Constants with default assignments
var CAPACITOR_X_SPACING = 0.024; // meters
Expand Down
4 changes: 2 additions & 2 deletions js/common/model/CircuitLocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

var capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );
const capacitorLabBasics = require( 'CAPACITOR_LAB_BASICS/capacitorLabBasics' );

var CircuitLocation = {
BATTERY_TOP: 'BATTERY_TOP',
Expand Down
Loading

0 comments on commit 9a61a87

Please sign in to comment.