jader
Simple tool to compile and serve Jade, CoffeeScript, Markdown and Stylus files
Last updated 5 years ago by mattms .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jader -g
SYNC missed versions from official npm registry.

Jade server

Jader lets you start a basic server in any folder.

It compiles Jade templates, with embedded or linked CoffeeScript, Markdown and Stylus files.

Please note: This is only intended for aiding development.

If you want to use Jade templates in production, consider using Express.

Alternatively, you can compile Jade files with jade index.jade or Gulp, but you may not have access to filters this way. Static files can then be served with Nginx.

Usage

You should install Jader globally so that it creates the executable script for you.

npm install -g jader

You can then start the server on localhost in any directory:

jader

If you need to use a different port to 80, use:

jader -p 1337

Jader will also serve any other static files in the directory.

Local variables

You can test the variables in templates by including a ".json" file along with each ".jade" file.

Any JSON file with the same base-name as the Jade template will be read and passed into the template as local variables.

Example

index.jade

doctype html
html
	head
		title #{title}
	body
		p #{message}

index.json

{
	"title": "My Page",
	"message": "It works!"
}

Current Tags

  • 0.4.2                                ...           latest (5 years ago)

6 Versions

  • 0.4.2                                ...           5 years ago
  • 0.4.1                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2017 © taobao.org |