mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-02 20:00:05 +02:00
quickstart
This commit is contained in:
15
README.md
15
README.md
@@ -2,12 +2,15 @@
|
|||||||
|
|
||||||
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/
|
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:
|
## Quickstart
|
||||||
```
|
|
||||||
minifyfromhtml --js=<output js file> --css=<output css file> < <input file>
|
|
||||||
```
|
|
||||||
|
|
||||||
example:
|
|
||||||
```
|
```
|
||||||
minifyfromhtml --js=dist/mywidget.min.js --css=dist/mywidget.min.css < example/index.html
|
npm i git+https://github.com/S2-/minifyfromhtml.git#semver:1.x
|
||||||
|
node node_modules\minifyfromhtml\minifyfromhtml.js --js=dist.js --css=dist.css < index.html
|
||||||
|
```
|
||||||
|
=>
|
||||||
|
```
|
||||||
|
css/mywidget.css -> dist.css
|
||||||
|
js/jquery.js -> dist.js
|
||||||
|
js/spectacularwidget.js -> dist.js
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user