>The primary alternative is maybe to use a build system that adds in the >platform-specific files when packaging apps, while keeping your source >tree >runnable in a browser...
This is the way to go. Take advantage of the compile step to customize packages/binaries for specific platforms.