Improved build script to leave JS dev versions