Grunt with Compass and Watch compiles slow

后端 未结 4 1737
既然无缘
既然无缘 2021-02-15 09:23

Grunt takes a quite long to compile the css file, I am not sure if this is normal but regular compass watch takes around 5 seconds.

So the question is if there is any w

4条回答
  •  深忆病人
    2021-02-15 10:13

    Well, you can watch using the Grunt-contrib-compass watch option. That'll spawn compass watch so you'll have better performance. Though this will not allow you to watch multiple type of files (for example if you also watch for .coffee file or always rebuild js, etc).

    If you absolutely need grunt-contrib-watch, then make sure sass caching is activated using the grunt task. From your config pasted here, it looks like it is. But cache issue is usually the reason compass takes a long time to compile; so I'd double check in my Gruntfile.js if I were you.

    Also, lots of spriting and image manipulation method can take quite a while to process.

提交回复
热议问题