You donβt mention how you do your assembly (usually it will be combined, as in the default task in the Grunt file below), but if you only need to change individual links to one mini link just try grunt-usemin to get the job done - see . replacement task in the Grunt file.
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>usemin</title> <link rel="stylesheet" href="css/reset.css" /> <link rel="stylesheet" href="css/base.css" /> </head> <body> <h1>usemin</h1> </body> </html>
Gruntfile
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), copy: { dist: { files: [ {src: 'index.html', dest: 'dist/index.html'} ] } }, 'useminPrepare': { options: { dest: 'dist' }, html: 'index.html' }, usemin: { html: ['dist/index.html'] } }); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-usemin'); grunt.registerTask('default', ['useminPrepare', 'copy', 'concat', 'cssmin', 'usemin']); grunt.registerTask('replace', ['copy', 'usemin']); };
HTML Result
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>usemin</title> <link rel="stylesheet" href="css/combined.min.css"> </head> <body> <h1>usemin</h1> </body> </html>
source share