Jinzhe Zeng
8f7fdcc8f0
fix: use html-minifier-terser instead of html-minifier
...
html-minifier-terser was developed based on html-minifier, and the difference
between them is that html-minifier-terser can minify inline ES6 scripts in html
file, but html-minifier cannot.
2021-03-01 18:20:22 -05:00
MDLeom
51cc9b1d8d
feat: show path that caused the error
2020-09-05 11:58:20 +00:00
MDLeom
37ba1d9a2b
refactor: destructure
2020-09-05 11:22:36 +00:00
MDLeom
ce8c4a145b
refactor(test): set default config in individual test
2020-09-05 11:18:35 +00:00
MDLeom
16cdf467d9
fix(js): compatibility with terser v5
...
- https://github.com/terser/terser/blob/master/CHANGELOG.md#v500-beta0
2020-09-05 10:56:33 +00:00
MDLeom
8bbecf676f
feat: utilise better minify-xml
...
- replace pretty-data
2020-09-02 11:23:20 +00:00
MDLeom
bdb7e94350
test(gz): blns
2020-06-06 07:42:12 +01:00
MDLeom
e5ab822c45
test(br): blns
2020-06-06 07:41:37 +01:00
MDLeom
c42b9040a6
test(js): throw error on invalid input
2020-05-25 09:36:21 +01:00
MDLeom
9e67d11e8a
test(html): invalid input
...
- uncovered using blns.json
- https://github.com/minimaxir/big-list-of-naughty-strings
2020-05-25 09:13:15 +01:00
curbengh
81ab472fe1
test: utilise toThrow() to catch error
...
- try...catch would (incorrectly) pass the test, despite having no error
2020-01-09 15:14:25 +00:00
curbengh
fdcdbef4a1
feat: minify json
2020-01-03 01:17:37 +00:00
curbengh
64ba16cb22
refactor(test): organise unit tests into separate files
2020-01-03 00:51:45 +00:00
curbengh
317b5e43d3
feat: minify xml
2020-01-03 00:35:25 +00:00
curbengh
d75b10b64b
fix: skip empty file
2020-01-02 12:49:29 +00:00
curbengh
d1ca7f9c2b
refactor(test): remove unnecessary variable
2019-12-30 06:01:28 +00:00
curbengh
4a5c66add2
style(test): it() to test()
2019-12-30 05:53:28 +00:00
curbengh
1c530b7d44
test(include): negation pattern and basename
2019-12-29 02:33:59 +00:00
curbengh
51ff9d953d
fix(test): corrects slash pattern tests
2019-12-28 10:26:25 +00:00
curbengh
50d80ccc70
feat(globbing): support disabling basename for each pattern in 'include:' option
2019-12-28 10:10:30 +00:00
curbengh
9d6b72422b
refactor(test): utilize Buffer.equals
...
- instead of binary-base64 conversion
- https://jestjs.io/docs/en/expect#toequalvalue
2019-12-28 08:42:14 +00:00
curbengh
7201b3f56f
refactor(test): de-duplicate variables
2019-12-27 23:12:46 +00:00
curbengh
440b9ccd8c
feat: rename 'logger:' option to 'verbose:'
...
BREAKING CHANGE
2019-12-27 22:54:09 +00:00
curbengh
e59e3866b9
test(br): invalid level
2019-12-27 09:12:27 +00:00
curbengh
1a5197b9c9
test(logger): add test
2019-12-27 08:55:39 +00:00
curbengh
866593110e
test(br): test passing option
2019-12-27 08:09:31 +00:00
curbengh
48868bfa7e
feat(gz & br): support custom compression level
2019-12-27 07:50:03 +00:00
curbengh
ab023da82e
test(brotli): add unit test
2019-12-27 05:59:44 +00:00
curbengh
626369e3e0
test(gzip): add unit test
2019-12-27 05:39:29 +00:00
curbengh
7e1ec95f9a
test(svg): add unit test
2019-12-27 04:32:03 +00:00
curbengh
7d163bcb00
test(js): result should not be undefined
2019-12-27 00:38:44 +00:00
curbengh
4e4605e1a4
test(css): invalid option
2019-12-26 15:32:21 +00:00
curbengh
f7c600545b
test: option.enable
2019-12-26 15:24:54 +00:00
curbengh
631503aa1a
fix: Terser should throw error if there is invalid option
...
- Other functions also throw error to abort
2019-12-26 15:06:32 +00:00
curbengh
b046d2a09e
fix: disable basename by invidual pattern
2019-12-26 14:44:42 +00:00
curbengh
679dcaf077
test: add tests for html, js, css minifiers
2019-12-26 13:19:39 +00:00