Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

less-middleware

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

less-middleware

LESS.js middleware for connect.

  • 0.1.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Installation

sudo npm install less-middleware

Options

OptionDescriptionDefault
forceAlways re-compile less files on each request.false
onceOnly check for need to recompile once after each server restart. Useful for reducing disk i/o on production.false
debugOutput any debugging messages to the console.false
srcSource directory containing the .less files. Required.
destDesitnation directory to output the compiled .css files.<src>
compressCompress the output being written to the *.css files. When set to 'auto' compression will only happen when the css file ends with .min.css or -min.css.auto
optimizationDesired level of LESS optimization. Optionally 0, 1, or 20

Examples

Connect

var lessMiddleware = require('less-middleware');

var server = connect.createServer(
    lessMiddleware({
        src: __dirname + '/public',
        compress: true
    }),
    connect.staticProvider(__dirname + '/public')
);

Express

var lessMiddleware = require('less-middleware');

var app = express.createServer();

app.configure(function () {
    // Other configuration here...

    app.use(lessMiddleware({
        src: __dirname + '/public',
        compress: true
    }));

    app.use(express.static(__dirname + '/public'));
});

FAQs

Package last updated on 19 Apr 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc