phetsims / forces-and-motion-basics

"Forces and Motion: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/forces-and-motion-basics
GNU General Public License v3.0
7 stars 10 forks source link

organize require statements #271

Closed pixelzoom closed 6 years ago

pixelzoom commented 6 years ago

In some source files, require statements are not grouped per PhET coding standards. In some cases they are not alphabetically ordered. In other cases, modules, images, etc. are grouped together.

E.g. in MotionModel.js:

  // modules
  var BooleanIO = require( 'TANDEM/types/BooleanIO' );
  var crateImage = require( 'image!FORCES_AND_MOTION_BASICS/crate.png' );
  var DerivedProperty = require( 'AXON/DerivedProperty' );
  var Emitter = require( 'AXON/Emitter' );
  var forcesAndMotionBasics = require( 'FORCES_AND_MOTION_BASICS/forcesAndMotionBasics' );
  var fridgeImage = require( 'image!FORCES_AND_MOTION_BASICS/fridge.png' );
  var girlHoldingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/girl-holding.png,level=1' );
  var girlSittingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/girl-sitting.png' );
  var girlStandingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/girl-standing.png' );
  var inherit = require( 'PHET_CORE/inherit' );
  var Item = require( 'FORCES_AND_MOTION_BASICS/motion/model/Item' );
  var ItemIO = require( 'FORCES_AND_MOTION_BASICS/motion/model/ItemIO' );
  var manHoldingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/man-holding.png' );
  var manSittingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/man-sitting.png' );
  var manStandingImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/man-standing.png' );
  var MotionConstants = require( 'FORCES_AND_MOTION_BASICS/motion/MotionConstants' );
  var mysteryObjectImage = require( 'image!FORCES_AND_MOTION_BASICS/mystery-object-01.png' );
  var NumberProperty = require( 'AXON/NumberProperty' );
  var ObservableArray = require( 'AXON/ObservableArray' );
  var ObservableArrayIO = require( 'AXON/ObservableArrayIO' );
  var Property = require( 'AXON/Property' );
  var PropertyIO = require( 'AXON/PropertyIO' );
  var Range = require( 'DOT/Range' );
  var StringIO = require( 'TANDEM/types/StringIO' );
  var trashCanImage = require( 'mipmap!FORCES_AND_MOTION_BASICS/trash-can.png' );
  var Util = require( 'DOT/Util' );
  var Vector2 = require( 'DOT/Vector2' );
  var waterBucketImage = require( 'image!FORCES_AND_MOTION_BASICS/water-bucket.png' );

@jessegreenberg is the responsible developer, but I'm guessing that he inherited this problem.

jessegreenberg commented 6 years ago

Thanks @pixelzoom, I scanned through everything and made sure that strings, modules, and images were separated and alphabetized. Closing.