# requireware

> Simple middleware to provide asynchronous require() script loading in the browser.

Latest version **0.2.0** (published 2013-03-23) · MIT license · 0 weekly downloads

## Install

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

## 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.2.0 |
| Published | 2013-03-23 |
| First published | 2013-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+9 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Tim Cameron Ryan |
| Maintainers | tcr |

## Links

- npm: https://www.npmjs.com/package/requireware
- Repository: https://github.com/tcr/requireware
- npm.io page: https://npm.io/package/requireware

## Dependencies (6)

- [send](https://npm.io/package/send.md) ~0.1.0
- [wrench](https://npm.io/package/wrench.md) ~1.4.4
- [express](https://npm.io/package/express.md) ~3.0.6
- [temporary](https://npm.io/package/temporary.md) 0.0.5
- [uglify-js](https://npm.io/package/uglify-js.md) ~2.2.3
- [fs-watch-tree](https://npm.io/package/fs-watch-tree.md) ~0.2.2

## Recent versions

- 0.2.0 (latest) — 2013-03-23
- 0.1.1 — 2013-01-16
- 0.1.0 — 2013-01-15
- 0.0.9 — 2013-01-15
- 0.0.8 — 2013-01-15
- 0.0.7 — 2013-01-14
- 0.0.6 — 2013-01-13
- 0.0.5 — 2013-01-11
- 0.0.4 — 2013-01-11
- 0.0.3-1 — 2013-01-11
- 0.0.3 — 2013-01-11
- 0.0.2 — 2013-01-11
- 0.0.1-3 — 2013-01-11
- 0.0.1-2 — 2013-01-11
- 0.0.1-1 — 2013-01-11
- … 1 more at https://npm.io/package/requireware/versions

## README

# <img src="http://game-icons.net/icons/lorc/originals/png/jigsaw-piece.png" width="32"> requireware

Simple middleware to provide asynchronous require() script loading in the browser.

```javascript
var express = require('express')
  , requireware = require('requireware');

var app = express()

app.use('/scripts', requireware(__dirname + '/static/scripts'))
app.use(express.static(__dirname + '/static'));

console.log('http://localhost:3000');
app.listen(3000);
```

In your page:

```html
<html>
<script src="/scripts">
// An inner script is run after content is asynchronously loaded.

// Load files which add items to `exports`
var EventEmitter = require('events').EventEmitter; 

// Load files which aren't `exports` aware.
require('jquery'); 

// Load remote files with a callback.
require.remote('http://example.com/remotescript.js', function () { /* ... */ })

</script>
<body>
  <h1>Content displayed before scripts are loaded.</h1>
</body>
</html>
```

## License

MIT

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