discourse/discourse — pull request #700 by wojciechka (2013-04-11 13:22:17+00:00)
Title: Moved javascript code that has its production counterpart so it is handled as symlink

The change is to move external JS files that have different contents for development and production so a symlink controls whether the one for production or development is used.

This will make it easier to choose between development and production - especially that git will not show it as file being overwritten when production JS files are used.

The reason for this is that for BitNami stacks (which copy app/assets/javascripts/external_production/* to app/assets/javascripts/external/), git diff shows a lot of confusing changes.

I am not sure this change is the best approach - another option would be to use `require_asset()` in ERB section of the application.erb.js and detect production mode, but then `// -require_tree` would need to be converted to individual files.

Another option is to use production files by default and recommend developers to overwrite them with `app/assets/javascripts/external_development` - after all it is easier to ask developers to make changes than end users to do so.