{"library":"sass-middleware","title":"SASS (Ruby Gem) Connect/Express Middleware","description":"This package provides Connect/Express middleware for compiling SASS files on the fly. It is an extremely old package, with its last known release being version 0.0.3, published over a decade ago. Crucially, it relies on the `sass` Ruby gem for compilation, which is now considered deprecated and superseded by Dart Sass (the official `sass` npm package). Due to its age and dependency on an outdated, external compiler (Ruby Sass), `sass-middleware` is abandoned and incompatible with modern Node.js environments and contemporary Express/Connect applications. Developers should instead integrate modern build tools (e.g., Webpack, Vite, Gulp) with Dart Sass for static compilation, or explore direct usage of the `sass` npm package API for programmatic compilation within a build process. The `node-sass-middleware` package, while also deprecated due to its reliance on `node-sass` (LibSass), is a more recent alternative that still faced similar end-of-life issues. This package offers no current release cadence and no active development, making it unsuitable for any new or existing projects.","language":"javascript","status":"abandoned","last_verified":"Thu Apr 23","install":{"commands":["npm install sass-middleware"],"cli":null},"imports":["const sassMiddleware = require('sass-middleware');","app.use(require('sass-middleware')({\n  src: path.join(__dirname, 'public'),\n  dest: path.join(__dirname, 'public'),\n  debug: true\n}));"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const express = require('express');\nconst path = require('path');\nconst sassMiddleware = require('sass-middleware');\nconst app = express();\n\n// Ensure `sass` Ruby gem is installed: `gem install sass`\n\napp.use(sassMiddleware({\n  src: path.join(__dirname, 'public'),\n  dest: path.join(__dirname, 'public'),\n  debug: true, // Output compilation errors to console\n  outputStyle: 'expanded', // 'compressed', 'nested', 'compact', 'expanded'\n  prefix: '/stylesheets' // Where .scss files are served from, e.g., /stylesheets/style.css\n}));\n\napp.use(express.static(path.join(__dirname, 'public')));\n\napp.get('/', (req, res) => {\n  res.send('<h1>Sass Middleware Example</h1><link rel=\"stylesheet\" href=\"/stylesheets/style.css\">');\n});\n\napp.listen(3000, () => {\n  console.log('Server running on http://localhost:3000');\n  console.log('Ensure you have `gem install sass` run in your environment.');\n  console.log('Create public/stylesheets/style.scss and refresh your browser.');\n});\n\n// Example public/stylesheets/style.scss content:\n// $font-stack: Helvetica, sans-serif;\n// $primary-color: #333;\n//\n// body {\n//   font: 100% $font-stack;\n//   color: $primary-color;\n// }","lang":"javascript","description":"This quickstart demonstrates how to integrate `sass-middleware` into an Express application for on-the-fly SASS compilation, requiring the deprecated Ruby Sass gem.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}