I would like to minify HTML, CSS and JavaScript files when I hit docpad generate
, how can I do that?
相关问题
- Azure Website Instance not running defined Node Ve
- What methods can be called on Docpad's Query t
- Docpad: using extendTemplateData via mongoose call
- docpad subdirectory rendered into general director
- Loop through posts' date in order to make arch
相关文章
- 骷髅列表不可用DocPad运行命令(Skeleton list isn't availabl
- docpad子目录渲染成一般目录(docpad subdirectory rendered into
- 遍历帖在订单日期,使档案DocPad(Loop through posts' date in
- Docpad:联系表格上显示的错误/成功消息(Docpad : show error/success
- What methods can be called on Docpad's Query t
- Docpad: using extendTemplateData via mongoose call
- docpad subdirectory rendered into general director
- Loop through posts' date in order to make arch
There are a few ways you can go about this. The most prominent and most immediate way is to modify your docpad configuration file to trigger an external tool like grunt to minify your assets via the grunt minify task. Here is a gist that showcases this.
Alternatively, there is also Cloudflare which is an amazing website DNS server that also acts as a CDN for your website's content, and minifies your assets automatically post-deployment. Read more here.
Also, while it isn't minify related, you can also concatenate your scripts with Browserify using this gist. Grunt also has a more straightfoward way of concatenating as well via the grunt concat task.
Eventually, perhaps plugins will do this automatically, but considering the fickleness with concatination it could be a while.
For list of all grunt plugins look here: https://github.com/gruntjs