Grunt with Compass and Watch compiles slow

后端 未结 3 1032
盖世英雄少女心
盖世英雄少女心 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 10:18

    Maybe a bit late to the party on this, but in case this helps anyone:

    I've found the same poor performance with grunt-contrib-watch and sass. The best way to get around this seems to be to use a different watch plugin. I've found that grunt-watch-nospawn (as opposed to grunt-contrib-watch plugin) is much faster to compile sass. Quite significantly so - I'm seeing improvements of around two seconds.

    If you want to tweak speed further, you can use grunt-sass instead of grunt-contrib-sass which uses libsass to provide another speed increase.

    This combined with an autoprefixer, eg. nDmitry's (can't link, no rep) this should fill functionality gaps left from omitting Compass.

    Hope that helps.

提交回复
热议问题