# pug-linker

> Link multiple pug ASTs together using include/extends

Latest version **4.0.0** (published 2020-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install pug-linker
pnpm add pug-linker
yarn add pug-linker
bun add pug-linker
```

## Health

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

Positive: no vulnerabilities; popular repo.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2020-05-25 |
| First published | 2015-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21847 |
| Author | Forbes Lindesay |
| Maintainers | forbeslindesay, pug-bot, timothygu |
| Keywords | pug |

## Links

- npm: https://www.npmjs.com/package/pug-linker
- Repository: https://github.com/pugjs/pug/tree/master/packages/pug-linker
- npm.io page: https://npm.io/package/pug-linker

## Dependencies (2)

- [pug-walk](https://npm.io/package/pug-walk.md) ^2.0.0
- [pug-error](https://npm.io/package/pug-error.md) ^2.0.0

## Recent versions

- 4.0.0 (latest) — 2020-05-25
- 4.0.0-canary-2 (canary) — 2020-05-25
- 4.0.0-canary-1 — 2020-05-24
- 3.0.6 — 2019-06-18
- 3.0.5 — 2018-03-08
- 3.0.4 — 2018-03-06
- 3.0.3 — 2017-09-06
- 3.0.2 — 2017-08-01
- 3.0.1 — 2017-06-02
- 3.0.0 — 2017-05-01
- 2.0.3 — 2017-04-18
- 2.0.2 — 2017-02-04
- 2.0.1 — 2017-01-25
- 2.0.0 — 2017-01-25
- 1.0.2 — 2017-01-24
- … 4 more at https://npm.io/package/pug-linker/versions

## README

# pug-linker

Link multiple pug ASTs together using include/extends

[![Build Status](https://img.shields.io/travis/pugjs/pug-linker/master.svg)](https://travis-ci.org/pugjs/pug-linker)
[![Dependencies Status](https://david-dm.org/pugjs/pug/status.svg?path=packages/pug-linker)](https://david-dm.org/pugjs/pug?path=packages/pug-linker)
[![DevDependencies Status](https://david-dm.org/pugjs/pug/dev-status.svg?path=packages/pug-linker)](https://david-dm.org/pugjs/pug?path=packages/pug-linker&type=dev)
[![NPM version](https://img.shields.io/npm/v/pug-linker.svg)](https://www.npmjs.org/package/pug-linker)

## Installation

    npm install pug-linker

## Usage

```js
var link = require('pug-linker');
```

### `link(ast)`

Flatten the Pug AST of inclusion and inheritance.

This function merely links the AST together; it doesn't read the file system to resolve and parse included and extended files. Thus, the main AST must already have the ASTs of the included and extended files embedded in the `FileReference` nodes. `pug-load` is designed to do that.

## License

  MIT

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