1.0.0 • Published 10 years ago
lisa-middleware v1.0.0
lisa-middleware
livescript and sass/scss middleware for connect/express
this middleware is strictly meant for development, as it recompiles the files on every request
install
npm install lisa-middleware
build (if applicable)
grunt build
use
// The middleware *must* be before express.static or anything else that could
// get to the file before this middleware
lisaMiddleware = require('lisa-middleware');
app.use("/static", lisaMiddleware({
    src: {
        // Directory to use for livescript files
        // any files ending in .ls in that directory will be intercepted
        // by the lisa middleware
        li: "./scripts/",
        // Same as above, but for sass/scss files.
        // Extensions intercepted: .sass .scss
        sa: "./styles/"
    },
    prefix: {
        // Example
        //  Source file: ./scripts/a/apple.ls
        //  Router location: /static/js/a/apple.ls
        li: "/js",
        sa: "/css"
    }
}));1.0.0
10 years ago