@codefresh-io/yaml-validator

An NPM module/CLI for validating the Codefresh YAML

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
522Jul 4, 2021Nov 10, 2016Minified + gzip package size for @codefresh-io/yaml-validator in KB

Readme

Codefresh YAML Validator

An NPM module/CLI for validating the Codefresh YAML.

npm version

Developed in Codefresh.

Installation

$ npm install @codefresh-io/yaml-validator -g

Usage

Command Line Interface

# Search for a file named codefresh.yml in the current working directory and validate it
cyv validate

# Validate the specified codefresh.yml file
cyv validate --file /path/to/codefresh.yml 

NPM Module

const cyv  = require('@codefresh-io/yaml-validator');
const yaml = require('js-yaml');
const fs   = require('fs');

const doc = yaml.safeLoad(fs.readFileSync('/path/to/codefresh.yml', 'utf8'));
cyv(doc);

License

Copyright © 2016, Codefresh. Released under the MIT license.


If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.