Commit Graph

29 Commits

Author SHA1 Message Date
curbengh 887eeda3cc
feat: add 'priority' options 2019-10-09 23:33:34 +01:00
curbengh 90bfe2ca36
style: to rename 'logger' to 'verbose' 2019-09-24 23:56:44 +01:00
curbengh 7085b15d10
style: rename logic* to minify* or *Fn 2019-09-15 16:55:36 +01:00
curbengh 7e85bd6338
feat: enable plugin by default and update options naming 2019-09-11 02:15:19 +01:00
curbengh 43a316d149
refactor: use basename instead of matchBase 2019-08-06 11:23:58 +09:30
weyusi c69b6d3356 feat: switch nanomatch to micromatch 2019-07-10 11:50:23 +09:30
weyusi 0ce066c2fd fix(html-minifier): ignore post excerpt tag
https://hexo.io/docs/tag-plugins#Post-Excerpt
2019-06-08 17:22:40 +09:30
weyusi 655f65adcd refactor: add 'use strict' 2019-05-27 10:44:04 +09:30
weyusi db58c8e686 fix: typo in default config of svgo 2019-05-21 13:45:18 +09:30
weyusi f05c379687 feat: assign more default options for html-minifier
* to minify more stuff.
  * remove deprecated removeCommentsFromCDATA
  * add removeScriptTypeAttributes and removeStyleLinkTypeAttributes
    * noticed from https://github.com/weyusi/hexo-nofollow/issues/4#issue-445559505
  * ref https://github.com/kangax/html-minifier
2019-05-18 17:01:15 +09:30
weyusi c9b7323768 refactor: remove default ignoreCustomComments from html-minifier
not sure why upstream has it in the first place ¯\_(ツ)_/¯
2019-05-18 14:19:42 +09:30
weyusi cdee4c0768 style: Standard JS 2019-05-02 15:55:43 +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
weyusi 528486761d feat: allow custom file extension for compressions 2019-04-23 15:10:43 +09:30
weyusi ce973f940f docs: rearrange options 2019-04-23 13:32:08 +09:30
weyusi 94a8f90c2b feat: allow custom options for neat_css
https://github.com/jakubpawlowicz/clean-css
2019-04-23 13:26:43 +09:30
weyusi 0946ab2f7b refactor: remove object-assign ponyfill
Object.assign() is supported by node 4 and up
2018-10-27 18:38:12 +10:30
weyusi 9c97c00aa4 refactor: var to let/const
https://hacks.mozilla.org/2015/07/es6-in-depth-let-and-const/
2018-10-26 15:27:23 +10:30
weyusi d2d92bc539 Disable logging by default 2018-10-25 20:15:26 +10:30
weyusi 58adaeb34d Use js standard style
https://standardjs.com/
2018-10-25 20:05:59 +10:30
weyusi 1dafc72850 Use after_generate instead of before_exit
before_exit was a workaround instead of proper after_generate
Use hexo router instead of filesystem manipulation, so hexo-fs is not required anymore
this approach also allows size comparison of original and compressed file, just like minifier currently have
inspired by
 - https://www.travisgeis.com/2018/04/23/lazy-image-resizing-in-hexo-image-sizes-v2/
 - https://github.com/ottobonn/hexo-image-sizes/blob/master/lib/ImageResizer.js
 - https://github.com/chenzhutian/hexo-all-minifier/blob/master/lib/concatJS.js
 - https://stackoverflow.com/a/39441194
2018-10-05 13:38:55 +09:30
weyusi b6425e622e Add brotli compression 2018-09-30 17:00:32 +09:30
weyusi 2dc6c5f48e Don't run gzip when public folder has/does not exist
Continuation of 71c5878400
This is necessary especially to prevent gzip from running when hexo clean
2018-09-29 15:11:14 +09:30
weyusi 71c5878400 Use 'after_generate' instead of 'before_exit'
Compatibility with hexo clean
2018-09-28 17:22:22 +09:30
weyusi ea13ea9967 Add gzip compression 2018-09-28 17:13:54 +09:30
weyusi 4745870028 uglify3 compatibility
Credit to 8d9f2da8276652ef270e943dbf9dcb648e14ed55
2018-09-27 18:13:19 +09:30
mygu 8300b72478 Add a print log configuration switch to solve compilation performance problems 2018-06-29 16:08:47 +08:00
rozbo b3be6d5b97 init code 2016-05-26 19:09:41 +08:00