https://github.com/codefresh-io/cf-yaml-validator
An NPM module/CLI for validating the Codefresh YAML
https://github.com/codefresh-io/cf-yaml-validator
Last synced: 7 months ago
JSON representation
An NPM module/CLI for validating the Codefresh YAML
- Host: GitHub
- URL: https://github.com/codefresh-io/cf-yaml-validator
- Owner: codefresh-io
- License: mit
- Created: 2016-11-10T09:55:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-11-28T14:31:21.000Z (over 1 year ago)
- Last Synced: 2025-08-30T17:48:32.700Z (9 months ago)
- Language: JavaScript
- Size: 947 KB
- Stars: 6
- Watchers: 17
- Forks: 4
- Open Issues: 43
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Codefresh YAML Validator
> An NPM module/CLI for validating the Codefresh YAML.
[](https://badge.fury.io/js/%40codefresh-io%2Fyaml-validator)
Developed in [Codefresh](https://www.codefresh.io).
## Installation
```bash
$ npm install @codefresh-io/yaml-validator -g
```
## Usage
### Command Line Interface
```sh
# 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
```js
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](https://codefresh.io).
Released under the [MIT license](https://github.com/codefresh-io/cf-expression-evaluator/blob/master/LICENSE).
***