play-middleware
PUG, LESS, Rollup and express' static middleware.
Last updated 3 years ago by audinue .
MIT · Original npm · Tarball · package.json
$ cnpm install play-middleware 
SYNC missed versions from official npm registry.

Play Middleware

PUG, LESS, Rollup and Express' static middleware.

Usage

app.use(playMiddleware(directory))

When foo.html is requested, Play Middleware will respond with the compilation result of foo.pug in the given directory. No physical files are generated.

The default directory is the current working directory ('.').

Compile time errors are logged in the console (STDERR) while CSS and JavaScript runtime errors are displayed in DevTools.

Mapping

foo.html -> foo.pug
foo.css  -> foo.less
foo.js   -> foo.es

Example

var express = require('express')
var app = require('app')
var playMiddleware = require('play-middleware')

app.use(playMiddleware())
  .listen(80, function () {
    console.log('Server is ready.')
  })

Current Tags

  • 0.1.0                                ...           latest (3 years ago)

1 Versions

  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |