How can I minify HTML, CSS and JavaScript files in DocPad?

后端 未结 2 1287
鱼传尺愫
鱼传尺愫 2021-02-04 15:27

I would like to minify HTML, CSS and JavaScript files when I hit docpad generate, how can I do that?

2条回答
  •  悲哀的现实
    2021-02-04 16:11

    • Use gruntjs for JS files. (Grunt will hook up into docpad generate)
    • Use grunt-contrib-mincss for css files.
    • Use grunt-contrib-htmlmin for html files.
    • Use grunt-compress for compressing all files.

    For list of all grunt plugins look here: https://github.com/gruntjs

提交回复
热议问题