Join John Riviello for an in-depth discussion in this video Install Grunt-Sass, part of CSS to Sass: Converting an Existing Site.
- View Offline
- So, now that we have at least…version 0.12 of Node.js installed,…we can proceed with installing and configuring libSass.…And to do that, we could install node-sass directly,…but to make it easier to interact with…and leverage other MPM modules,…we'll be using the Grunt task runner.…If you're not familiar with Grunt,…it is a node.js based tool to help you…execute various MPM modules.…There are other task runners, such as…Gulp, and Broccoli that also offer node-sass tools.…So, if you're already using another task runner,…you can use the Sass plugin for…that task runner if you wish.…
Be sure to use the plugins mentioned here,…as they use libSass instead of Ruby Sass.…To use Grunt, you first have to install the Grunt CLI,…or command line interface tool, globally,…which will provide you with a Grunt command.…To do that, open up the command line…and then run npm install -g for global, grunt-cli.…That will then attempt to install…the latest version of Grunt CLI.…If the install failed with a permissions error…like you see here, then it's probably the first time…
In these Sass tutorials, students will learn the benefits of libSass over the original Ruby Sass, and set up a Sass-friendly development environment with Node.js and Grunt. A unique aspect of this course is learning how to handle challenges specific to integrating Sass with an existing website, such as new debugging workflows and the variables and mixins worth the effort to define. Author John Riviello also introduces a few Sass tools that speed up media query handling, automatic browser prefixing, and sprite generation. At the end of the course, he shows how your setup work pays off, styling a whole new section of the practice site in just 15 minutes.
- Deciding between Ruby Sass or libSass
- Installing Node.js and Grunt-Sass
- Converting CSS to SCSS
- Creating core variables and mixins
- Abstracting units and values
- Applying advanced mixins
- Generating image sprites with eyeglass-spriting
- Creating high-DPI sprites
- Building new styles