Commit Graph

82 Commits

Author SHA1 Message Date
wherewhere 83484f0e47 feat: split filter 2024-12-02 16:48:09 +08:00
MDLeom 7f2033e553
feat: zstd compression
disabled by default due to lack of server support
close #156
2024-06-06 11:14:57 +00:00
MDLeom 0bee9ada0e
refactor: switch html-minifier to html-minifier-terser
https://github.com/kangax/html-minifier/issues/1135
2024-01-28 10:26:21 +00:00
MDLeom a6f434ff8d
fix(svg): ignore empty input 2022-11-06 04:50:36 +00:00
MDLeom a6e2ea0879
fix(svg): svgo@3 now throws error
- cleanupIDs -> cleanupIds
- https://github.com/svg/svgo/releases/tag/v3.0.0
2022-11-06 02:58:07 +00:00
MDLeom c0041b0f23
fix(svg): compatibility with svgo 2.4+
- overriding default plugins
- https://github.com/svg/svgo/releases/tag/v2.4.0
2021-10-10 09:19:50 +00:00
MDLeom 3819909c84
chore(deps): bump svgo from 1.3.2 to 2.3.0 (BREAKING CHANGE)
- BREAKING CHANGE: syntax of minify.svg.plugins option
  * https://github.com/svg/svgo/releases/tag/v2.0.0
- svgo optimize() changed from async to sync
2021-04-25 08:25:32 +00: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 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 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 fdcdbef4a1
feat: minify json 2020-01-03 01:17:37 +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 50d80ccc70
feat(globbing): support disabling basename for each pattern in 'include:' option 2019-12-28 10:10:30 +00:00
curbengh 440b9ccd8c
feat: rename 'logger:' option to 'verbose:'
BREAKING CHANGE
2019-12-27 22:54:09 +00:00
curbengh f0b37aaf45
chore: requires at least Node 10.18
BREAKING CHANGE: Drop Node 8 and iltorb
- utilize native brotli
- Drop string-to-buffer conversion
  * conversion was necessary for iltorb
2019-12-27 08:00:16 +00:00
curbengh 48868bfa7e
feat(gz & br): support custom compression level 2019-12-27 07:50:03 +00:00
curbengh 932d36182c
fix: reject a promise with an error object
- resolve "Unhandled promise rejection" error
- https://stackoverflow.com/a/47803880
2019-12-27 04:30:10 +00:00
curbengh 9df4e8283b
fix(logger): pass the correct variable to the parameter 2019-12-27 03:31:33 +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 7eda55a1aa perf: use + operator
instead of Array.push()
https://stackoverflow.com/a/55409094
2019-12-16 08:43:35 +00:00
curbengh 1fdac53793 style: object-shorthand
https://eslint.org/docs/rules/object-shorthand
2019-12-16 08:43:35 +00:00
curbengh 2548eb20bf
fix(js): remove 'priority' option
- Terser really doesn't like unsupported options
- 'priority' is introduced in 887eeda3cc
2019-11-09 07:18:59 +00:00
curbengh de425e4b6f
refactor: destructure object 2019-11-09 07:16:07 +00:00
curbengh 213700a617
fix: array should join() without a separator
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join
2019-10-10 08:04:56 +01:00
curbengh 48bf9951f0
fix: join Array, instead of using first index 2019-10-06 09:24:25 +01:00
curbengh 461fe1dd41
fix: bind 'this' to error() 2019-10-06 06:33:35 +01:00
curbengh 5de4a237b7
refactor: convert Stream to Buffer using Array.push() 2019-10-06 06:32:35 +01:00
curbengh 2c5ad19932
fix: utilize hexo.log to display error message 2019-10-04 08:27:25 +01:00
curbengh e473408673
feat: support native brotli 2019-09-25 01:33:47 +01:00
curbengh 60a045e429
refactor: async/await
- https://dev.to/gafi/7-reasons-to-always-use-async-await-over-plain-promises-tutorial-4ej9
- https://stackoverflow.com/a/56975197
2019-09-25 01:14:37 +01:00
curbengh fd474580ce
refactor: destructure object 2019-09-24 23:55:07 +01:00
curbengh 7085b15d10
style: rename logic* to minify* or *Fn 2019-09-15 16:55:36 +01:00
curbengh b5639aba85
refactor: logger function 2019-09-15 16:51:15 +01:00
curbengh 36bca1b939
refactor: use const function 2019-09-15 16:16:53 +01:00
curbengh 7e85bd6338
feat: enable plugin by default and update options naming 2019-09-11 02:15:19 +01:00
curbengh ede71a0857
fix: options.exclude might not exist
Fixes a6f59a9704 (r34629621)
2019-08-09 11:48:08 +09:30
curbengh 32a519928a
style: standard 2019-08-06 11:57:44 +09:30
curbengh a6f59a9704
feat: disable basename globbing when pattern contains slash 2019-08-06 11:26:11 +09:30
weyusi c69b6d3356 feat: switch nanomatch to micromatch 2019-07-10 11:50:23 +09:30
weyusi 655f65adcd refactor: add 'use strict' 2019-05-27 10:44:04 +09:30
weyusi 8531b77cfc style: arrow function
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
2019-05-21 11:16:14 +09:30
weyusi a87dd05ff4 refactor: new is not necessary
https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding
2019-05-02 16:34:11 +09:30
weyusi cdee4c0768 style: Standard JS 2019-05-02 15:55:43 +09:30
weyusi cceae36368 style: fix comment 2019-04-23 17:57:52 +09:30
weyusi 374c16575b style: rearrange and give more neat_js config examples 2019-04-23 17:46:56 +09:30
weyusi 15465ca16b feat: minify svg using svgo 2019-04-23 17:33:30 +09:30