Commit 3657aa3
authored
🏗️🚀:minify the script the site serves
The counter shipped as it is written upstream, comments and all. It is
squeezed on the way out instead: 9,213 bytes to 5,774, and 3,327 to
2,263 once gzipped, which is the figure that counts.
The copy in the repository is untouched, which is what lets both things
be true at once: a reader downloads the small one, and the one here
stays byte for byte what upstream serves, so `nps verify.vendored` can
still tell whether it has fallen behind.
A minifier drops comments, and the two lines this one opens with are
its terms rather than decoration -- ISC asks for the notice in every
copy. They are kept, along with anything marked `@license` or
`@preserve`.
Images and scripts are both copied rather than rendered, so neither
meets a transform; the pass over the output now knows what to do with
each. That leaves nothing served here that is not squeezed: markup,
styles, marks and now this.
Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
PR-URL: #1867
Fixes: #15481 parent 3817ce2 commit 3657aa3
3 files changed
Lines changed: 40 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
224 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
225 | 251 | | |
226 | 252 | | |
227 | 253 | | |
228 | 254 | | |
229 | 255 | | |
230 | 256 | | |
231 | 257 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
236 | 264 | | |
237 | | - | |
238 | | - | |
| 265 | + | |
| 266 | + | |
239 | 267 | | |
240 | 268 | | |
241 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments