Getting Sassy with Node.js
summary
Explains how node-sass exposes custom importer and JS functions so Sass can call real JavaScript modules, not just replicate logic. Shows two concrete tools: Eyeglass for asset-heavy integrations and a lightweight wrapper, sassport, that auto-converts Sass values and lets require() work. Demonstrates wrapping the npm module image-size via sassport.wrap to return exact width/height into Sass, compiles live and produces correctly sized CSS, proving the approach works.
AI-written summary · about
chapters (13)
- 0:00Introduction and audience poll
- 1:03What is Sass capable of
- 4:37Why use Sass over JavaScript
- 5:59Node Sass and its features
- 7:03Custom importers in Node Sass
- 8:50Node Sass functions and JavaScript
- 10:15Sass Eyeglass overview
- 12:44SassPort introduction
- 14:08Wrapping functions with SassPort
- 15:13Requiring JavaScript in Sass
- 17:20Demo dynamic logo sizing
- 19:26Summary and tools recap
- 19:46Q&A session
