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

grunt-yaml

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-yaml - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

2

package.json
{
"name": "grunt-yaml",
"description": "Compiles YAML to JSON.",
"version": "0.4.0",
"version": "0.4.1",
"homepage": "https://github.com/shiwano/grunt-yaml",

@@ -6,0 +6,0 @@ "author": {

@@ -121,2 +121,14 @@ # grunt-yaml [![Build Status](https://secure.travis-ci.org/shiwano/grunt-yaml.png?branch=master)](http://travis-ci.org/shiwano/grunt-yaml)

#### options.readEncoding
Type: `String`
Default value: `grunt.file.defaultEncoding`
An override to the default buffer encoding used to read in the YAML file (`grunt.file.read`).
#### options.writeEncoding
Type: `String`
Default value: `grunt.file.defaultEncoding`
An override to the default buffer encoding used to write out the JSON file (`grunt.file.write`).
### Usage Examples

@@ -130,2 +142,3 @@

## Release History
* 2014-07-12   v0.4.1   Add `writeEncoding` and `readEncoding` options.
* 2014-01-23   v0.4.0   Change yamlLoader behavior for showing the file name on js-yaml error, and add `strict` option.

@@ -132,0 +145,0 @@ * 2014-01-18   v0.3.1   Use grunt.warn on js-yaml error.

@@ -67,4 +67,12 @@ /*

disableDest: false,
strict: false
strict: false,
readEncoding: grunt.file.defaultEncoding,
writeEncoding: grunt.file.defaultEncoding
});
var readOptions = {
encoding: options.readEncoding
}
var writeOptions = {
encoding: options.writeEncoding
}

@@ -81,3 +89,3 @@ yamlSchema = createYamlSchema(options.customTypes);

var dest = filePair.dest.replace(/\.ya?ml$/, '.json');
var result = loadYaml(src);
var result = loadYaml(src, readOptions);
var json = JSON.stringify(result, null, options.space);

@@ -90,3 +98,3 @@

if (!options.disableDest) {
grunt.file.write(dest, json);
grunt.file.write(dest, json, writeOptions);
grunt.log.writeln('Compiled ' + src.cyan + ' -> ' + dest.cyan);

@@ -93,0 +101,0 @@ }

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