Grunt with Compass and Watch compiles slow

后端 未结 3 1031
盖世英雄少女心
盖世英雄少女心 2021-02-15 09:38

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

3条回答
  •  抹茶落季
    2021-02-15 09:59

    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.

提交回复
热议问题