Skip to content

Commit

Permalink
Fix js-yaml bug with references
Browse files Browse the repository at this point in the history
use package's versio nof js-yaml instead of grunt's version.
  • Loading branch information
antoinegoutagny committed Mar 17, 2016
1 parent 676e873 commit a9af88f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@ In lieu of a formal styleguide, take care to maintain the existing coding style.

## Release History

* 2016-03-17: [v1.0.2](https://github.com/Swaven/grunt-merge-yaml/releases/tag/v1.0.2): fix js-yaml reference bug
* 2016-03-10: [v1.0.1](https://github.com/Swaven/grunt-merge-yaml/releases/tag/v1.0.1): object keys defined in 2nd file only are added
* 2016-03-08: [v0.1.0](https://github.com/Swaven/grunt-merge-yaml/releases/tag/v0.1.0): first release
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-merge-yaml",
"description": "Merge together 2 yaml files",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/Swaven/grunt-merge-yaml",
"author": {
"name": "Swaven"
Expand Down
5 changes: 2 additions & 3 deletions tasks/merge_yaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ module.exports = function(grunt) {
baseFile = this.data.base,
target = this.data.target,
dest = this.data.dest,
// file = 'config/config.' + target + '.yml',
baseConfig = grunt.file.readYAML(baseFile),
config = grunt.file.readYAML(target),
baseConfig = yaml.safeLoad(fs.readFileSync(baseFile, 'utf8')),
config = yaml.safeLoad(fs.readFileSync(target, 'utf8')),
mergedConfig = explore(baseConfig, config),
mergedContent = yaml.safeDump(mergedConfig); // Serialize object as YAML

Expand Down

0 comments on commit a9af88f

Please sign in to comment.