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
.
- @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
1 Answer
Reset to default 6I'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条)