# yamlify

> YAML for browserify and node.js; YAML includes

Latest version **0.2.0** (published 2017-08-31) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2017-08-31 |
| First published | 2014-07-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 28 |
| Maintainers | zag2art, cray0000 |
| Keywords | yaml, browserify, browserify-transform |

## Links

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

## Dependencies (2)

- [js-yaml](https://npm.io/package/js-yaml.md) ~3.0.2
- [through](https://npm.io/package/through.md) ~2.3.4

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2017-08-31
- 0.1.3 — 2016-03-10
- 0.1.2 — 2014-09-20
- 0.1.1 — 2014-07-19
- 0.1.0 — 2014-07-19

## README

# yamlify

> YAML (`.yaml`, `.yml`) files support for browserify and node.  
> With feature to include `yaml` files into each other.  
         

## YAML support for browserify and node.js

Yamlify!
```js
// server.js

var browserify = require('browserify');
var yamlify = require('yamlify');

b = browserify();
b.add('./client.js');
b.transform(yamlify);
```

Add ability to require YAML files in Node.js
```js
// server.js

require('yamlify/register');
```

After that you can require yaml wherever you want: 
```js
// client.js or server.js

var constants = require('./constants.yaml');
```

## YAML files inclusions

This plugin also adds an ability to include yaml files into each other.

Lets say you want to keep some data in a partial file:
 
```yaml
# _films.yaml

- &terminator
  name: Terminator 2 
  year: 1991
- name: Avatar
  year: 2009
``` 
 
You can include a whole `.yaml` file into another one like this: 
```yaml
# director.yaml

name: James Cameron 
films: !include ./_films 
```
  
You can also include a particular anchor from the specified file:  

```yaml
# me.yaml

name: John Smith
favouriteFilm: !include ./_films *terminator
```


## licence
MIT

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