# jadequire

> require jade files in node

Latest version **0.1.0** (published 2013-05-24) · BSD license · 0 weekly downloads

## Install

```sh
npm install jadequire
pnpm add jadequire
yarn add jadequire
bun add jadequire
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2013-05-24 |
| First published | 2013-05-24 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Brad Harris |
| Maintainers | bmharris |
| Keywords | require, jade, node, extension, synchronous |

## Links

- npm: https://www.npmjs.com/package/jadequire
- Repository: https://github.com/selfcontained/jadequire
- npm.io page: https://npm.io/package/jadequire

## Dependencies (2)

- [deap](https://npm.io/package/deap.md) ~0.1.2
- [jade](https://npm.io/package/jade.md) ~0.30.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2013-05-24

## README

[![Build Status](https://secure.travis-ci.org/selfcontained/jadequire.png?branch=master)](http://travis-ci.org/selfcontained/jadequire)

jadequire
=========

require jade files in node (synchronously)

---

Uses `require.extensions[]` internally, and `fs.readFileSync`, so be aware of the synchronous i/o happening if you use this (i.e. not in a request handler).

```
npm install jadequire
```

### register handler
```javascript
var jadequire = require('jadequire');

jadequire({
  extension: '.jade', // default
  encoding: 'utf8', // default
  compileDebug: false, // default
  // ... any other options you can pass into jade.compile()
});
```
...and require your jade files

```jade
//template.jade
h1 {#name}
h2 I was the turkey the whole time! 
```

```javascript
// yes, this is synchronous i/o, so be careful where you use it
var tpl = require('template.jade');

tpl({name:'Zim'});
```

```html
<h1>Zim</h1>
<h2>I was the turkey the whole time!</h2>
```

### unregister handler

```javascript
jadequire.remove(); // removes '.jade' extension handler

jadequire.remove('.jd') // specify handler to remove

// jadequire also returns a handler that can be removed
var handler = jadequire({
  extension: '.jd'
});

handler.remove(); // removes the .jd extension handler
```

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