Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Latest commit

 

History

History
40 lines (32 loc) · 1.07 KB

readme.md

File metadata and controls

40 lines (32 loc) · 1.07 KB

less connect middleware

Build Status

'use strict';

const http = require('http');
const connect = require('connect');
const serveLess = require('less-connect-middleware');

const app = connect();

// Set it up
app.use(
    serveLess({
        // The base (or root) directory from which files will be served
        root: process.cwd(),
        less: {
            // Specifies directories to scan for @import directives when parsing.
            // Default value is the directory of the source file, which is probably what you want
            paths: []
        },
        // See https://github.com/postcss/autoprefixer for more options
        autoprefixer: {
            // Browser queries for vendor prefixing CSS
            // https://github.com/ai/browserslist
            browsers: [
                'ie 9-11',
                'defaults'
            ]
        }
    })
);

// Press go
http.createServer(app).listen(3000);