# domreadify

> Browserify transform to execute the script only on DOM ready

Latest version **1.0.0** (published 2019-05-30) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2019-05-30 |
| First published | 2019-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yuri Sitnikov |
| Maintainers | sitnikov |

## Links

- npm: https://www.npmjs.com/package/domreadify
- Repository: https://github.com/yusitnikov/domreadify
- Homepage: https://github.com/yusitnikov/domreadify#readme
- Issues: https://github.com/yusitnikov/domreadify/issues
- npm.io page: https://npm.io/package/domreadify

## Dependencies (1)

- [browserify-transform-tools](https://npm.io/package/browserify-transform-tools.md) ^1.7.0

## Recent versions

- 1.0.0 (latest) — 2019-05-30

## README

# domreadify
A [browserify](https://www.npmjs.com/package/browserify) [transform](https://github.com/browserify/module-deps#transforms) to execute the script only on DOM ready.

If you have global dependencies that would be available only after loading the whole page,
the domreadify transform will allow to postpone `export` execution by executing the whole script on DOM ready event.

## Installation

Install with npm:
```cmd
npm install domreadify --save-dev
```

Install with yarn:
```cmd
yarn add domreadify --dev
```

The package has no configurations.

## Usage

Command line argument:
```cmd
browserify src.js -o output.js --transform domreadify
```

or you can add the transform to your `package.json`:
```json
{
  "browserify": {
    "transform": ["domreadify"]
  }
}
```

```cmd
browserify src.js -o output.js
```

## See also

[browserify-global-shim](https://www.npmjs.com/package/browserify-global-shim) -
a browserify transform for replacing modules with global variables.
You probably will want to use `browserify-global-shim` and `domreadify` together:
first replace modules with global variables, then postpone the script execution to DOM ready
(when all global variables are available).

## License

Copyright (c) 2019 Yuri Sitnikov. Licensed under the MIT license.

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