Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

leinster/grunt-json-massager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-json-massager

Modify JSON files with functions. Briefly useful in 2013, archived 2025.

Installation

This plugin requires Grunt ~0.4.1

Install grunt-json-massager with npm:

npm install grunt-json-massager --save-dev

and enable the plugin in your Gruntfile with:

grunt.loadNpmTasks('grunt-json-massager');

Usage

Overview

In your project's Gruntfile, add a section named json_massager to the data object passed into grunt.initConfig().

grunt.initConfig({
  json_massager: {
    your_target: {
      files: {
        'build/some.json': ['build/some.json']
      },
      modifier: function(obj) {
        obj.password = passwordFromScope;
        delete obj.REMOVE_ME;
        return obj;
      }
    },
  },
})

Properties

files

A src-dest file mapping. dest may be equal to src for in-place edits.

modifier

The function that modifies and returns the parsed object. See above.

Release History

  • 2013-09-19   v0.1.0   It does what it needs to do.

License

Copyright (c) 2013 Jon Ramsey

Licensed under the MIT license.

About

Modify JSON files with functions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published