Could the WP script/style loader be used to concatenate and gzip scripts and styles in the front-end?
late answer From a brief look: You’d have to use include( admin_url().’load-scripts.php’ ); and include( admin_url().’script-loader.php’ ); Then jump into $GLOBALS[‘wp_scripts’]: Use… $wp_scripts->default_dirs( array_merge( $wp_scripts->default_dirs ,array( ‘/themes/your_theme/js/’ ) ); …to extend it. And then use $wp_scripts->add( $handle, $path_from_content_dir, false/array( $deps ), $ver ) to add a script. Notes: Uncompressed scripts get searched by .dev.js (when … Read more