All Projects → crissdev → gulp-yaml

crissdev / gulp-yaml

Licence: MIT License
A Gulp plugin to convert YAML to JSON

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to gulp-yaml

vim-localorie
A Vim plugin for easy look-up of translations for Rails i18n YAML keys.
Stars: ✭ 27 (+12.5%)
Mutual labels:  yaml, yml
pollly
The simplest editor to translate apps & sites for YML files. Fast and Simple. Try now!
Stars: ✭ 32 (+33.33%)
Mutual labels:  yaml, yml
Gulp Gh Pages
A gulp 4 plugin to publish contents to Github pages
Stars: ✭ 611 (+2445.83%)
Mutual labels:  gulp-plugin, stream
gulp-html
Gulp plugin for HTML validation, using the official Nu Html Checker (v.Nu)
Stars: ✭ 70 (+191.67%)
Mutual labels:  gulp-plugin, gulpplugin
Yq
Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
Stars: ✭ 1,688 (+6933.33%)
Mutual labels:  yaml, yml
Carvel Ytt
YAML templating tool that works on YAML structure instead of text
Stars: ✭ 816 (+3300%)
Mutual labels:  yaml, yml
Simple-YAML
A Java API that provides an easy-to-use way to store data using the YAML format.
Stars: ✭ 68 (+183.33%)
Mutual labels:  yaml, yml
Strictyaml
Type-safe YAML parser and validator.
Stars: ✭ 836 (+3383.33%)
Mutual labels:  yaml, yml
Yaml Expander
Expands internal property references in a yaml file.
Stars: ✭ 137 (+470.83%)
Mutual labels:  yaml, yml
exenv
Exenv makes loading environment variables from external sources easy.
Stars: ✭ 35 (+45.83%)
Mutual labels:  yaml, yml
meros
🪢 A fast utility that makes reading multipart responses simple
Stars: ✭ 109 (+354.17%)
Mutual labels:  stream
AzurePipelinesSamples
Azure Pipeline Samples - sample configurations with explanation and useful links
Stars: ✭ 23 (-4.17%)
Mutual labels:  yml
Huong-dan-cai-dat-stream-server-va-chuyen-doi-video-sang-streaming
Hướng dẫn cài đặt stream server và chuyển đổi video thường sang dạng TS Streaming
Stars: ✭ 29 (+20.83%)
Mutual labels:  stream
HomeAssistant
My Home Assistant Configuration
Stars: ✭ 71 (+195.83%)
Mutual labels:  yaml
Diffy
🎞️💓🍿 Love streaming - It's always best to watch a movie together ! 🤗
Stars: ✭ 37 (+54.17%)
Mutual labels:  stream
livego
直播服务器 hls stream online RTMP AMF HLS HTTP-FLV
Stars: ✭ 30 (+25%)
Mutual labels:  stream
web-streams-polyfill
Web Streams, based on the WHATWG spec reference implementation
Stars: ✭ 198 (+725%)
Mutual labels:  stream
stream
Stream. Curating your streams (MIT) License
Stars: ✭ 15 (-37.5%)
Mutual labels:  stream
Streamator
A Spectator Specifically build for Content Creation and Streaming
Stars: ✭ 18 (-25%)
Mutual labels:  stream
callbag-rs
Rust implementation of the callbag spec for reactive/iterable programming
Stars: ✭ 25 (+4.17%)
Mutual labels:  stream

gulp-yaml

JavaScript Style Guide npm version Build Status Build status Dependency Status

A Gulp plugin to convert YAML to JSON using js-yaml.

Install

npm install gulp-yaml --save-dev

Usage

const yaml = require('gulp-yaml');

gulp.src('./src/*.yml')
  .pipe(yaml({ schema: 'DEFAULT_SAFE_SCHEMA' }))
  .pipe(gulp.dest('./dist/'))

gulp.src('./src/*.yml')
  .pipe(yaml({ space: 2 }))
  .pipe(gulp.dest('./dist/'))

gulp.src('./src/*.yml')
  .pipe(yaml({ safe: true }))
  .pipe(gulp.dest('./dist/'))

API

yaml([options])

options.safe

Type: Boolean

Default: true

Enable or disable support for regexps, functions and undefined.

This flag should always be enabled when working with untrusted data.

When this flag is enabled then safeLoad method is used, otherwise load.

options.space

Type: Number or String

Default: null

Control spacing in the resulting output. It has the same usage as for JSON.stringify

options.replacer

Type: Function or Array

Default: null

Further transform the resulting output. It has the same usage as for JSON.stringify

options.schema

Type: String

Default: DEFAULT_SAFE_SCHEMA or DEFAULT_FULL_SCHEMA

Specifies what schema to use. Valid values are the same that js-yaml supports, except they are received as strings (lowercase or uppercase). See the example in the Usage section of this README. The default schema is chosen using the safe option.

options.filename

Type: String

Default: the path of the file processed

String to be used as a file path in error/warning messages.

options.ext

Type: String

Default: .json

File extension of the generated file.

options.json

Type: Boolean

Default: false

Compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error.

options.onWarning

Type: Function

Default: null

Function to call on warning messages. Loader will throw on warnings if this function is not provided.

License

MIT © Cristian Trifan

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].