1.0.6 • Published 8 years ago

yaml-with-import v1.0.6

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

##Yaml with Import CircleCI

  • Supports nested yaml import(s)
  • Supports multiple imports
  • Supports overriding with deep copying

Install

npm i yaml-with-import --save

##Example

file1.yml

imports:
  - {resource: file2.yml}

database: mongoDB

route:
  blogs: /
  defaults: {controller: Blog:index}

file2.yml

route:
  blogs: /blogs
  defaults: {controller: Blog:list}
  methods: [post, put]

yaml.read('file1.yml');

Expected results:

database: mongoDB

route:
  blogs: /
  defaults: {controller: Blog:index}
  methods: [post, put]

##Usage:

es6

import Yaml from 'yaml-with-import';

const yaml = new Yaml();
yaml.read('file.yml');

es5

var Yaml = require('yaml-with-import').default;

var yaml = new Yaml();
yaml.read('file.yml');
1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago