Skip to content

Commit 89f494e

Browse files
authored
Update demo site
1 parent 4e10260 commit 89f494e

File tree

11 files changed

+2230
-537
lines changed

11 files changed

+2230
-537
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
dist/
2+
assets/

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,14 @@ npm link .
137137

138138
Note that almost all options are disabled by default. For command line usage please see `html-minifier-terser --help` for a list of available options. Experiment and find what works best for you and your project.
139139

140-
* **Sample command line:** ``html-minifier-terser --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true``
140+
- **Sample command line:** `html-minifier-terser --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true`
141141

142142
### Node.js
143143

144144
```js
145-
var minify = require('html-minifier-terser').minify;
146-
var result = await minify('<p title="blah" id="moo">foo</p>', {
145+
const { minify } = require('html-minifier-terser');
146+
147+
const result = await minify('<p title="blah" id="moo">foo</p>', {
147148
removeAttributeQuotes: true
148149
});
149150
result; // '<p title=blah id=moo>foo</p>'
@@ -156,3 +157,9 @@ Benchmarks for minified HTML:
156157
```shell
157158
node benchmark.js
158159
```
160+
161+
## Running local server
162+
163+
```shell
164+
npm run serve
165+
```

assets/main.css

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
html,
2+
body {
3+
font-size: 16px;
4+
}
5+
6+
body {
7+
font-family: "Cambria", Georgia, Times, "Times New Roman", serif;
8+
margin: 0;
9+
padding: 0;
10+
font-size: 1rem;
11+
}
12+
13+
.wrapper {
14+
padding: 20px;
15+
}
16+
17+
.header {
18+
font-size: 1.2rem;
19+
}
20+
21+
.main {
22+
display: grid;
23+
grid-template-columns: 5fr 2fr;
24+
column-gap: 20px;
25+
}
26+
27+
.input-content,
28+
.output-content {
29+
width: 100%;
30+
height: 15rem;
31+
resize: vertical;
32+
margin-bottom: 5px;
33+
}
34+
35+
.form-group {
36+
margin-bottom: 0.7rem;
37+
}
38+
39+
.quiet {
40+
font-size: 0.85rem;
41+
color: #888;
42+
}
43+
44+
.short {
45+
display: block;
46+
margin-top: 0.25rem;
47+
margin-left: 0.25rem;
48+
}
49+
50+
.options {
51+
background-color: #ffe;
52+
padding: 10px;
53+
height: calc(100vh - 20px);
54+
overflow-y: auto;
55+
}
56+
57+
.success {
58+
color: green;
59+
}
60+
61+
.failure {
62+
color: red;
63+
}
64+
65+
.unsafe {
66+
color: #f33;
67+
}
68+
69+
.mr-1 {
70+
margin-bottom: 1rem;
71+
}

0 commit comments

Comments
 (0)