Package Exports
- node-sass-koa-middleware
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-sass-koa-middleware) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-sass-koa-middleware
Koa middleware for node-sass.
A simple adaption of the official Connect/Express middleware for Koa.
Install
npm i node-sass-koa-middlewareType definitions are included.
Usage
Recompile .scss or .sass files automatically for koa based http servers.
Koa example
const Koa = require('koa');
const path = require('path');
const serve = require('koa-static');
const sassMiddleware = require('node-sass-koa-middleware');
const app = new Koa();
app.use(sassMiddleware({
src: __dirname,
dest: __dirname + '/public',
debug: true,
outputStyle: 'compressed',
prefix: '/prefix' // Where prefix is at <link rel="stylesheets" href="prefix/style.css"/>
}));
app.use(serve(path.join(__dirname, '/public')));
app.listen(3000);Options
- Same options that node-sass-middleware.
For full list of options see original node-sass project here.
License
Under MIT license.
See LICENSE for details.