javascript - Yeoman: Add sasscompass support in grunt to existing project - Stack Overflow

I have an existing project, but I need to add sasspass so that grunt will automatically pile it when I

I have an existing project, but I need to add sass/pass so that grunt will automatically pile it when I use the grunt server mand.

Does anyone know how I do this?

Edit: I've managed to add grunt sas/passs to the project, but I need to configure gruntfile.js to watch and pile the css. All I've done to add sass support is to run npm install grunt-contrib-sass --save-dev.

I have an existing project, but I need to add sass/pass so that grunt will automatically pile it when I use the grunt server mand.

Does anyone know how I do this?

Edit: I've managed to add grunt sas/passs to the project, but I need to configure gruntfile.js to watch and pile the css. All I've done to add sass support is to run npm install grunt-contrib-sass --save-dev.

Share Improve this question edited Aug 24, 2013 at 22:15 ptf asked Aug 24, 2013 at 21:41 ptfptf 3,3808 gold badges39 silver badges68 bronze badges 6
  • @TJonS I've managed to add grunt sass to the project, but I need to configure gruntfile.js to watch and pile the css. – ptf Commented Aug 24, 2013 at 21:55
  • 3 Have you tried to do it at all yourself? If so, please share what you've done. – tjons Commented Aug 24, 2013 at 21:56
  • I used yeoman to set up the project, but didn't add sass/pass support. All I've done to add sass support is npm install grunt-contrib-sass --save-dev. – ptf Commented Aug 24, 2013 at 21:57
  • 2 Why don't you add the support? Or, you should at least try! – tjons Commented Aug 24, 2013 at 22:00
  • This question may be a duplicate. Here is the previous question; It may help. – tjons Commented Aug 24, 2013 at 22:02
 |  Show 1 more ment

1 Answer 1

Reset to default 6

I've made a gist of a Gruntfile.js I'm using for a project that does SASS pilation and a handfull of other things.

It's inspired of Yeoman's webapp generated Gruntfile.js, with BlessCSS and Assemble, Htmlmin configured to run smoothly with Usemin and Coffee/Mocha stuff mented out.

Basically, what you need to do is config the SASS task and then add it to the watch task, and setup livereload to watch your CSS files.


Edit:

Since I was using this Gruntfile and these grunt tasks pretty often, I've since made a yeoman generator that you can checkout here : p-j/generator-yawa

It does sass/pass among other things.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745452542a4628337.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信