# static-jade

> Serve static Jade files from an Connect(Express) server.

Latest version **1.0.1** (published 2015-06-27) · 0 weekly downloads

## Install

```sh
npm install static-jade
pnpm add static-jade
yarn add static-jade
bun add static-jade
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-06-27 |
| First published | 2015-06-27 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.4.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | XuKaixuan |
| Maintainers | bbuc |
| Keywords | express, connect, jade, middleware |

## Links

- npm: https://www.npmjs.com/package/static-jade
- Repository: https://github.com/bibiuc/static-jade
- Homepage: http://github.com/bibiuc/static-jade.git
- Issues: https://github.com/bibiuc/static-jade/issues
- npm.io page: https://npm.io/package/static-jade

## Dependencies (2)

- [jade](https://npm.io/package/jade.md) *
- [deep-mixin](https://npm.io/package/deep-mixin.md) *

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-06-27
- 1.0.0 — 2015-06-27
- 1.1.2 — 2015-06-27

## README

# static-jade
Serve static Jade files from an Connect(Express) server.

## Installing

It's an NPM package. You can just do the following.

    npm install static-jade
## Usage

##### Simple

    var server = require("connect")();//  require("app")()  .
    server.use(require('static-jade')(path.join(__dirname,"views")));

##### Default Options

    var server = require("connect")();//  require("app")()  .
    server.use(require('static-jade')({
        src:path.join(__dirname,"views")
        extname: "",            // if you want to use it,I advise you use words like ".html","_html" or "._". !!!don't use "/"!
        next2data:false,        // if true ,you can get jade'option from before route
        defaults:{},            // jade default option
        routes:{"/":"/index"}  // "*/"  will not go to "*/index.jade",will clear the last "/";
    }));
##### next2data
    var server = require("connect")();//  require("app")()  .
        server.use("/",function(req,res,next){
            next({
                message:"love"
                type:"jade"
            })
        });
        server.use(
            require('static-jade')({
                src:path.join(__dirname,"views")
                next2data: true
            })
        );

---
_Source: https://npm.io/package/static-jade · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
