mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 12:00:03 +02:00
readme
This commit is contained in:
8
README.md
Normal file
8
README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# minifyfromhtml
|
||||
|
||||
This little helper minifies scripts and css starting from an html file. I made it after asking this question on stackoverflow: https://stackoverflow.com/questions/50188269/minify-js-and-css-in-one-go-starting-from-html/
|
||||
|
||||
It takes an input html file, parses it, and outputs all included javascript and css files minified to a file you specify:
|
||||
```
|
||||
minifyfromhtml --js=<output js file> --css=<output css file> < <input file>
|
||||
```
|
24
example/dist/index.html
vendored
Normal file
24
example/dist/index.html
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Example</title>
|
||||
|
||||
<!-- just the minified stuff -->
|
||||
<script type="text/javascript" charset="utf-8" src="dist.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="dist.css" />
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="mywidget"></div>
|
||||
|
||||
<script>
|
||||
//widget init
|
||||
spectacularwidget(document.getElementById('mywidget'));
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user