lisa-middlewaredeprecated

lisa-middleware ===

Usage no npm install needed!

<script type="module">
  import lisaMiddleware from 'https://cdn.skypack.dev/lisa-middleware';
</script>

README

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"
    }
}));