# flat-raml

> Flatten a multi-file RAML document into a single RAML file

Latest version **1.2.3** (published 2015-09-11) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install flat-raml
pnpm add flat-raml
yarn add flat-raml
bun add flat-raml
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2015-09-11 |
| First published | 2015-03-24 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Joel Edwards |
| Maintainers | buzuli |
| Keywords | RAML |

## Links

- npm: https://www.npmjs.com/package/flat-raml
- Repository: https://github.com/joeledwards/node-flat-raml
- Homepage: https://github.com/joeledwards/node-flat-raml#readme
- Issues: https://github.com/joeledwards/node-flat-raml/issues
- npm.io page: https://npm.io/package/flat-raml

## Dependencies (3)

- [q](https://npm.io/package/q.md) ~1.4.1
- [raml-parser](https://npm.io/package/raml-parser.md) ~0.8.11
- [raml-object-to-raml](https://npm.io/package/raml-object-to-raml.md) ~0.0.5

## Recent versions

- 1.2.3 (latest) — 2015-09-11
- 1.2.2 — 2015-09-08
- 1.2.1 — 2015-07-24
- 1.2.0 — 2015-07-16
- 1.1.0 — 2015-03-24
- 1.0.0 — 2015-03-24

## README

# node-flat-raml
Flatten a multi-file RAML document into a single RAML file

### Flattening a RAML document into a single file
```coffeescript
srcFile = 'spec.raml'
dstFile = 'flat.raml'
flattener = require 'flat-raml' 
flattener.flatten srcFile dstFile
  .then (outFile) -> console.log(outFile, "written")
  .catch (error) -> "error flattening RAML doc:", error, "\nstack:\n", error.stack
```

### Parsing a RAML document into a serialized string
```coffeescript
srcFile = 'spec.raml'
flattener = require 'flat-raml' 
flattener.asString srcFile
  .then (serialized) -> console.log(srcFile, "read. Serialized content:\n", serialized)
  .catch (error) -> "error reading RAML doc:", error, "\nstack:\n", error.stack
```

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