Skip to content
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.

joeledwards/node-flat-raml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-flat-raml [⚠️ DEPRECATED ⚠️]

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

Flattening a RAML document into a single file

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

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published