I have an HTML file with embedded javascript code, here is a simple example:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript">
</script>
</head>
<body>
</body>
</html>
What is the easiest way to get the same file with all the JS fragments inside it?
An HTML file can be arbitrarily complex and have several script fragments. For a number of reasons, I don’t need js divided into separate .js files in the resulting html.
We use the closure compiler and have grunt in the project.
source
share