{"id":14985653,"url":"https://github.com/crissdev/gulp-yaml","last_synced_at":"2025-04-11T22:04:42.889Z","repository":{"id":18925431,"uuid":"22144680","full_name":"crissdev/gulp-yaml","owner":"crissdev","description":"A Gulp plugin to convert YAML to JSON","archived":false,"fork":false,"pushed_at":"2019-05-01T12:10:37.000Z","size":73,"stargazers_count":24,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-04T10:28:15.179Z","etag":null,"topics":["gulp-plugin","gulpplugin","javascript","json","stream","yaml","yml"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crissdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-23T12:02:19.000Z","updated_at":"2023-10-20T09:41:21.000Z","dependencies_parsed_at":"2022-09-02T06:10:50.573Z","dependency_job_id":null,"html_url":"https://github.com/crissdev/gulp-yaml","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fgulp-yaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fgulp-yaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fgulp-yaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fgulp-yaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crissdev","download_url":"https://codeload.github.com/crissdev/gulp-yaml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239785315,"owners_count":19696754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp-plugin","gulpplugin","javascript","json","stream","yaml","yml"],"created_at":"2024-09-24T14:11:26.043Z","updated_at":"2025-02-20T05:32:09.935Z","avatar_url":"https://github.com/crissdev.png","language":"JavaScript","readme":"# gulp-yaml\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![npm version](https://badge.fury.io/js/gulp-yaml.svg)](http://badge.fury.io/js/gulp-yaml)\n[![Build Status](https://travis-ci.org/crissdev/gulp-yaml.svg?branch=master)](https://travis-ci.org/crissdev/gulp-yaml)\n[![Build status](https://ci.appveyor.com/api/projects/status/ncljdqu2v5d611p5/branch/master?svg=true\u0026passingText=master%20-%20OK)](https://ci.appveyor.com/project/crissdev/gulp-yaml/branch/master)\n[![Dependency Status](https://david-dm.org/crissdev/gulp-yaml.svg)](https://david-dm.org/crissdev/gulp-yaml)\n\n\u003e A [Gulp](https://github.com/gulpjs/gulp) plugin to convert [YAML](http://en.wikipedia.org/wiki/YAML) to [JSON](http://en.wikipedia.org/wiki/JSON) using [js-yaml](https://github.com/nodeca/js-yaml).\n\n\n## Install\n\n```sh\nnpm install gulp-yaml --save-dev\n```\n\n## Usage\n\n```js\nconst yaml = require('gulp-yaml');\n\ngulp.src('./src/*.yml')\n  .pipe(yaml({ schema: 'DEFAULT_SAFE_SCHEMA' }))\n  .pipe(gulp.dest('./dist/'))\n\ngulp.src('./src/*.yml')\n  .pipe(yaml({ space: 2 }))\n  .pipe(gulp.dest('./dist/'))\n\ngulp.src('./src/*.yml')\n  .pipe(yaml({ safe: true }))\n  .pipe(gulp.dest('./dist/'))\n```\n\n\n## API\n\n### yaml([options])\n\n\n#### options.safe\n\nType: `Boolean`\n\nDefault: `true`\n\nEnable or disable support for regexps, functions and undefined.\n\n**This flag should always be enabled when working with untrusted data.**\n\nWhen this flag is enabled then [safeLoad](https://github.com/nodeca/js-yaml#safeload-string---options-) method is used, otherwise [load](https://github.com/nodeca/js-yaml#load-string---options-).\n\n\n#### options.space\n\nType: `Number` or `String`\n\nDefault: `null`\n\nControl spacing in the resulting output. It has the same usage as for [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n\n#### options.replacer\n\nType: `Function` or `Array`\n\nDefault: `null`\n\nFurther transform the resulting output. It has the same usage as for [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n\n#### options.schema\n\nType: `String`\n\nDefault: `DEFAULT_SAFE_SCHEMA` or `DEFAULT_FULL_SCHEMA`\n\nSpecifies what schema to use. Valid values are the same that [js-yaml](https://github.com/nodeca/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.\n\n\n#### options.filename\n\nType: `String`\n\nDefault: the path of the file processed\n\nString to be used as a file path in error/warning messages.\n\n#### options.ext\n\nType: `String`\n\nDefault: `.json`\n\nFile extension of the generated file.\n\n#### options.json\n\nType: `Boolean`\n\nDefault: `false`\n\nCompatibility with JSON.parse behaviour.\nIf true, then duplicate keys in a mapping will override values rather than\nthrowing an error.\n\n#### options.onWarning\n\nType: `Function`\n\nDefault: `null`\n\nFunction to call on warning messages.\nLoader will throw on warnings if this function is not provided.\n\n## License\n\nMIT © [Cristian Trifan](https://crissdev.com)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrissdev%2Fgulp-yaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrissdev%2Fgulp-yaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrissdev%2Fgulp-yaml/lists"}