Home:ALL Converter>replace source files in html with minified version

replace source files in html with minified version

Ask Time:2017-06-20T07:28:07         Author:jmiguel77

Json Formatter

I have successfully created a minified / compressed version of my css and javascript files using a maven plugin

But now i want to replace the section of my main html page that loads all those files, i mean i have this in my html

<link rel="stylesheet" href="styles/app/01.css">
<link rel="stylesheet" href="styles/app/02.css">
<link rel="stylesheet" href="styles/app/03.css">

that i need to replace with something like this

<link rel="stylesheet" href="styles/app/minified.css">

and in the javascript section i have this

<script src="scripts/01.js"></script>
<script src="scripts/02.js"></script>
<script src="scripts/03.js"></script>

that i need to replace with

<script src="scripts/minified.js"></script>

is there any way to do that with maven ? or do i need something else ?

Author:jmiguel77,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/44641436/replace-source-files-in-html-with-minified-version
yy