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 738adf3 commit e2da6ae
Show file tree
Hide file tree
Showing 25 changed files with 204 additions and 204 deletions.
2 changes: 1 addition & 1 deletion js/AtomComponentEnum.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author Aadish
*/
define( function( require ) {
define( require => {
'use strict';

var AtomComponentEnum = {
Expand Down
6 changes: 3 additions & 3 deletions js/AtomIdentifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* @author Jesse Greenberg
*/

define( function( require ) {
define( require => {
'use strict';
var shred = require( 'SHRED/shred' );
var Util = require( 'DOT/Util' );
const shred = require( 'SHRED/shred' );
const Util = require( 'DOT/Util' );

// An arbitrary value used to signify a 'trace' abundance, meaning that a very small amount of this isotope is
// present on Earth.
Expand Down
10 changes: 5 additions & 5 deletions js/ShredConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Bounds2 = require( 'DOT/Bounds2' );
var PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var shred = require( 'SHRED/shred' );
const Bounds2 = require( 'DOT/Bounds2' );
const PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const shred = require( 'SHRED/shred' );

var ShredConstants = {

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

var Utils = {
/**
Expand Down
20 changes: 10 additions & 10 deletions js/model/NumberAtom.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AtomIdentifier = require( 'SHRED/AtomIdentifier' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var DerivedPropertyIO = require( 'AXON/DerivedPropertyIO' );
var Emitter = require( 'AXON/Emitter' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberIO = require( 'TANDEM/types/NumberIO' );
var NumberProperty = require( 'AXON/NumberProperty' );
var shred = require( 'SHRED/shred' );
var Tandem = require( 'TANDEM/Tandem' );
const AtomIdentifier = require( 'SHRED/AtomIdentifier' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const DerivedPropertyIO = require( 'AXON/DerivedPropertyIO' );
const Emitter = require( 'AXON/Emitter' );
const inherit = require( 'PHET_CORE/inherit' );
const NumberIO = require( 'TANDEM/types/NumberIO' );
const NumberProperty = require( 'AXON/NumberProperty' );
const shred = require( 'SHRED/shred' );
const Tandem = require( 'TANDEM/Tandem' );

// constants
const NumberDerivedProperty = DerivedPropertyIO( NumberIO );
Expand Down
10 changes: 5 additions & 5 deletions js/model/NumberAtomIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
* @author John Blanco (PhET Interactive Simulations)
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ObjectIO = require( 'TANDEM/types/ObjectIO' );
var NumberAtom = require( 'SHRED/model/NumberAtom' );
var shred = require( 'SHRED/shred' );
var validate = require( 'AXON/validate' );
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
const NumberAtom = require( 'SHRED/model/NumberAtom' );
const shred = require( 'SHRED/shred' );
const validate = require( 'AXON/validate' );

class NumberAtomIO extends ObjectIO {

Expand Down
30 changes: 15 additions & 15 deletions js/model/Particle.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberIO = require( 'TANDEM/types/NumberIO' );
var NumberProperty = require( 'AXON/NumberProperty' );
var ParticleIO = require( 'SHRED/model/ParticleIO' );
var PhetioObject = require( 'TANDEM/PhetioObject' );
var Property = require( 'AXON/Property' );
var PropertyIO = require( 'AXON/PropertyIO' );
var Range = require( 'DOT/Range' );
var shred = require( 'SHRED/shred' );
var ShredConstants = require( 'SHRED/ShredConstants' );
var Tandem = require( 'TANDEM/Tandem' );
var Vector2 = require( 'DOT/Vector2' );
var Vector2Property = require( 'DOT/Vector2Property' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const inherit = require( 'PHET_CORE/inherit' );
const NumberIO = require( 'TANDEM/types/NumberIO' );
const NumberProperty = require( 'AXON/NumberProperty' );
const ParticleIO = require( 'SHRED/model/ParticleIO' );
const PhetioObject = require( 'TANDEM/PhetioObject' );
const Property = require( 'AXON/Property' );
const PropertyIO = require( 'AXON/PropertyIO' );
const Range = require( 'DOT/Range' );
const shred = require( 'SHRED/shred' );
const ShredConstants = require( 'SHRED/ShredConstants' );
const Tandem = require( 'TANDEM/Tandem' );
const Vector2 = require( 'DOT/Vector2' );
const Vector2Property = require( 'DOT/Vector2Property' );

// constants
var DEFAULT_PARTICLE_VELOCITY = 200; // Basically in pixels/sec.
Expand Down
36 changes: 18 additions & 18 deletions js/model/ParticleAtom.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AtomIdentifier = require( 'SHRED/AtomIdentifier' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var DerivedPropertyIO = require( 'AXON/DerivedPropertyIO' );
var inherit = require( 'PHET_CORE/inherit' );
var LinearFunction = require( 'DOT/LinearFunction' );
var NumberIO = require( 'TANDEM/types/NumberIO' );
var ObservableArray = require( 'AXON/ObservableArray' );
var ObservableArrayIO = require( 'AXON/ObservableArrayIO' );
var ParticleAtomIO = require( 'SHRED/model/ParticleAtomIO' );
var ParticleIO = require( 'SHRED/model/ParticleIO' );
var PhetioObject = require( 'TANDEM/PhetioObject' );
var shred = require( 'SHRED/shred' );
var ShredConstants = require( 'SHRED/ShredConstants' );
var Tandem = require( 'TANDEM/Tandem' );
var Utils = require( 'SHRED/Utils' );
var Vector2 = require( 'DOT/Vector2' );
var Vector2Property = require( 'DOT/Vector2Property' );
const AtomIdentifier = require( 'SHRED/AtomIdentifier' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const DerivedPropertyIO = require( 'AXON/DerivedPropertyIO' );
const inherit = require( 'PHET_CORE/inherit' );
const LinearFunction = require( 'DOT/LinearFunction' );
const NumberIO = require( 'TANDEM/types/NumberIO' );
const ObservableArray = require( 'AXON/ObservableArray' );
const ObservableArrayIO = require( 'AXON/ObservableArrayIO' );
const ParticleAtomIO = require( 'SHRED/model/ParticleAtomIO' );
const ParticleIO = require( 'SHRED/model/ParticleIO' );
const PhetioObject = require( 'TANDEM/PhetioObject' );
const shred = require( 'SHRED/shred' );
const ShredConstants = require( 'SHRED/ShredConstants' );
const Tandem = require( 'TANDEM/Tandem' );
const Utils = require( 'SHRED/Utils' );
const Vector2 = require( 'DOT/Vector2' );
const Vector2Property = require( 'DOT/Vector2Property' );

// constants
var NUM_ELECTRON_POSITIONS = 10; // first two electron shells, i.e. 2 + 8
Expand Down
10 changes: 5 additions & 5 deletions js/model/ParticleAtomIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
* @author John Blanco (PhET Interactive Simulations)
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ObjectIO = require( 'TANDEM/types/ObjectIO' );
var shred = require( 'SHRED/shred' );
var validate = require( 'AXON/validate' );
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
const shred = require( 'SHRED/shred' );
const validate = require( 'AXON/validate' );

// ifphetio
var phetioEngine = require( 'ifphetio!PHET_IO/phetioEngine' );
const phetioEngine = require( 'ifphetio!PHET_IO/phetioEngine' );

class ParticleAtomIO extends ObjectIO {

Expand Down
6 changes: 3 additions & 3 deletions js/model/ParticleIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ObjectIO = require( 'TANDEM/types/ObjectIO' );
var shred = require( 'SHRED/shred' );
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
const shred = require( 'SHRED/shred' );

class ParticleIO extends ObjectIO {

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

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

return new Namespace( 'shred' );
} );
40 changes: 20 additions & 20 deletions js/view/AtomNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AtomIdentifier = require( 'SHRED/AtomIdentifier' );
var ElectronCloudView = require( 'SHRED/view/ElectronCloudView' );
var ElectronShellView = require( 'SHRED/view/ElectronShellView' );
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );
var Path = require( 'SCENERY/nodes/Path' );
var PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
var Property = require( 'AXON/Property' );
var Shape = require( 'KITE/Shape' );
var shred = require( 'SHRED/shred' );
var Tandem = require( 'TANDEM/Tandem' );
var Text = require( 'SCENERY/nodes/Text' );
var Vector2 = require( 'DOT/Vector2' );
const AtomIdentifier = require( 'SHRED/AtomIdentifier' );
const ElectronCloudView = require( 'SHRED/view/ElectronCloudView' );
const ElectronShellView = require( 'SHRED/view/ElectronShellView' );
const inherit = require( 'PHET_CORE/inherit' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const PhetColorScheme = require( 'SCENERY_PHET/PhetColorScheme' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
const Property = require( 'AXON/Property' );
const Shape = require( 'KITE/Shape' );
const shred = require( 'SHRED/shred' );
const Tandem = require( 'TANDEM/Tandem' );
const Text = require( 'SCENERY/nodes/Text' );
const Vector2 = require( 'DOT/Vector2' );

// strings
var minusSignIonString = require( 'string!SHRED/minusSignIon' );
var neutralAtomString = require( 'string!SHRED/neutralAtom' );
var positiveSignIonString = require( 'string!SHRED/positiveSignIon' );
var stableString = require( 'string!SHRED/stable' );
var unstableString = require( 'string!SHRED/unstable' );
const minusSignIonString = require( 'string!SHRED/minusSignIon' );
const neutralAtomString = require( 'string!SHRED/neutralAtom' );
const positiveSignIonString = require( 'string!SHRED/positiveSignIon' );
const stableString = require( 'string!SHRED/stable' );
const unstableString = require( 'string!SHRED/unstable' );

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

// modules
var inherit = require( 'PHET_CORE/inherit' );
var shred = require( 'SHRED/shred' );
var SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
var Tandem = require( 'TANDEM/Tandem' );
const inherit = require( 'PHET_CORE/inherit' );
const shred = require( 'SHRED/shred' );
const SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
const Tandem = require( 'TANDEM/Tandem' );

/**
* @param {Bucket} bucket
Expand Down
16 changes: 8 additions & 8 deletions js/view/ElectronCloudView.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Circle = require( 'SCENERY/nodes/Circle' );
var inherit = require( 'PHET_CORE/inherit' );
var RadialGradient = require( 'SCENERY/util/RadialGradient' );
var shred = require( 'SHRED/shred' );
var ShredConstants = require( 'SHRED/ShredConstants' );
var SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
var Tandem = require( 'TANDEM/Tandem' );
const Circle = require( 'SCENERY/nodes/Circle' );
const inherit = require( 'PHET_CORE/inherit' );
const RadialGradient = require( 'SCENERY/util/RadialGradient' );
const shred = require( 'SHRED/shred' );
const ShredConstants = require( 'SHRED/ShredConstants' );
const SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
const Tandem = require( 'TANDEM/Tandem' );

/**
* @param {ParticleAtom} atom
Expand Down
16 changes: 8 additions & 8 deletions js/view/ElectronShellView.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
* @author John Blanco
*/

define( function( require ) {
define( require => {
'use strict';

// modules
var Circle = require( 'SCENERY/nodes/Circle' );
var inherit = require( 'PHET_CORE/inherit' );
var KeyboardUtil = require( 'SCENERY/accessibility/KeyboardUtil' );
var Node = require( 'SCENERY/nodes/Node' );
var Property = require( 'AXON/Property' );
var shred = require( 'SHRED/shred' );
var Tandem = require( 'TANDEM/Tandem' );
const Circle = require( 'SCENERY/nodes/Circle' );
const inherit = require( 'PHET_CORE/inherit' );
const KeyboardUtil = require( 'SCENERY/accessibility/KeyboardUtil' );
const Node = require( 'SCENERY/nodes/Node' );
const Property = require( 'AXON/Property' );
const shred = require( 'SHRED/shred' );
const Tandem = require( 'TANDEM/Tandem' );

// constants
var LINE_DASH = [ 4, 5 ];
Expand Down
Loading

0 comments on commit e2da6ae

Please sign in to comment.