compass-middleware

0.0.3 • Public • Published

compass-middleware

compass middleware for expressjs.

  • Note that the implement of Compass compile is mostly modified from the source of grunt-contrib-compass but have removed grunt dependence.

install

npm install compass-middleware

usage

var compass = require( 'compass-middleware' );
var app = require( 'express' )();
 
app.use(compass({
      src: options.base,
      dest: options.tmpDir
    }, {
      sassDir: 'src',
      cssDir: 'src',
      imagesDir: 'src',
      generatedImagesDir: 'src',
      httpGeneratedImagesPath: 'http://localhost:3333/src',
      cacheDir: '.sass-cache',
      force: false
    }))

config

This middleware accepts two object as options:

compass( baseOptions, compassOptions )

baseOptions allows you to config source base and dest base

{
    src: '/my/project/src',
    dest: '/var/tmp/temporary'
}

compassOptions is just the same as grunt-contrib-compass options.

Readme

Keywords

none

Package Sidebar

Install

npm i compass-middleware

Weekly Downloads

2

Version

0.0.3

License

ISC

Last publish

Collaborators

  • abc-team
  • neekey