普通网友 2015-06-18 02:35
浏览 52
已采纳

缩小每个目录的JS和CSS

I am looking to minify all of my .js and .css files for my site. They are located in a few separate directories and there are a lot of them. I am looking to use this Minify code.

Using the minify builder, I can manually add each .js and .css file to the string or I can combine them into an array as a group in the groupsConfig.php file.

That is all manual per file, and when .js files are added/removed/changed a lot from all of the developers the groupsConfig.php arrays get difficult to keep up with.

Is there a way to use minify to dynamically grab all .js or .css files from a particular directory and minify them? This way I won't have to worry about keeping the groupsConfig.php file up to date. I could just specify the js directories and that's the end of the config.

I'm also open to suggestions for other code to use instead of Minify. I am looking to minimize all .js and .css files to help SEO of my site. I am utilizing straight javascript, jquery, and angularjs.

  • 写回答

2条回答 默认 最新

查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题