Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resolve-yaml

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-yaml

Merge yaml files and resolve relative file paths

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Merge YAML files and resolve relative file paths

I needed a tool to merge docker-compose files. docker-compose config was ill suited, because it skips unsupported options like deploy that are only used by docker stack deploy.

In contrast to existing tools like merge-yaml this tool transforms relative paths, so the paths are still valid in the merged file. Every string element that starts with ./ is considered a path and is transformed relative to the current working directory.

Installation

npm install -g resolve-yaml

Usage

resolve-yaml file1.yaml file2.yaml [...] >out.yaml

Example

resolve-yaml dir1/docker-compose.yml dir2/docker-compose.yaml >out.yaml

dir1/docker-compose.yml

version: '3'
services:
  serviceA:
    build: ./

dir2/docker-compose.yml

version: '3'
services:
  serviceB:
    build: ./subdirectory

out.yml

version: '3'
services:
  serviceA:
    build: ./dir1

  serviceB:
    build: ./dir2/subdirectory

FAQs

Package last updated on 01 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc