cspre
Coffee-Script preprocessor === This is an alpha version - We do not recommend using it in production environments, etc.<br> Options, Objects, and syntax are subject to change.
Last updated 6 years ago by jd .
Repository · Original npm · Tarball · package.json
$ cnpm install cspre 
SYNC missed versions from official npm registry.

Coffee-Script preprocessor

This is an alpha version - We do not recommend using it in production environments, etc.
Options, Objects, and syntax are subject to change.

CSPre allows you to run a CoffeeScript file directly as if it was a static resource.

Usage

The easiest way to use CSP is to Using this middleware is as simple as:

var cspre = require('cspre')()

However, you may wish to specify options, ie.

var options = { index: 'default', ext: '.cs', cd: '/home/ }
var cspre = require('cspre'){options}

Options

CSPre currently supports four options

index

This is the default file to serve when a directory is requested

default: 'index'

ext

This is the default file extension that will be checked if omitted in the request

default: '.coffee'

cd

Directory to serve files from (relative to current script's location).

default: './'

cache

There is no cache in the current implementation

default: false

Accessible Objects

Three objects are available from within CSPre scripts: req, res and next.
Please see the Express API documentation for more information.

Requirements

Current Tags

  • 0.1.1                                ...           latest (6 years ago)

2 Versions

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

Copyright 2014 - 2016 © taobao.org |