{"_id":"gruntfile-editor","_rev":"14-bc8c79a1af529543ae20e18af80aa280","name":"gruntfile-editor","description":"API to modify the content of a Gruntfile.js file","dist-tags":{"latest":"1.2.1"},"versions":{"0.1.0":{"name":"gruntfile-editor","version":"0.1.0","description":"API to modify the content of a Gruntfile.js file","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git://github.com/SBoudrias/gruntfile-editor.git"},"keywords":["gruntfile","ast"],"author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","bugs":{"url":"https://github.com/SBoudrias/gruntfile-editor/issues"},"homepage":"https://github.com/SBoudrias/gruntfile-editor","dependencies":{"ast-query":"~0.2.3","lodash":"~2.4.1"},"_id":"gruntfile-editor@0.1.0","dist":{"shasum":"b6cd84776dbf0681c16c95a8fce1f8ebb1b4e49e","tarball":"https://registry.npmjs.org/gruntfile-editor/-/gruntfile-editor-0.1.0.tgz","integrity":"sha512-0Lu6NVi0u8Rujunm4AVvSJwyluD93+Cg53xHfS/MBY5R1WB/U9WQ8/PQDLSIzogGIHyU2dcFKQFhYEF6mc9v4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHir50cxWC6RXfnXCEILqkg8mFsyFGu/JvHiK6Bh2wNSAiEA0XrV3wuoSj1qEv/zP/x96bVW8auoHLwVnM/XyRmBTB0="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"}]},"0.1.1":{"name":"gruntfile-editor","version":"0.1.1","description":"API to modify the content of a Gruntfile.js file","main":"index.js","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git://github.com/SBoudrias/gruntfile-editor.git"},"keywords":["gruntfile","ast"],"author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","bugs":{"url":"https://github.com/SBoudrias/gruntfile-editor/issues"},"homepage":"https://github.com/SBoudrias/gruntfile-editor","dependencies":{"ast-query":"~0.2.3","lodash":"~2.4.1"},"_id":"gruntfile-editor@0.1.1","dist":{"shasum":"b8db939fdc9831fcea46519b99eb507d9a51ed41","tarball":"https://registry.npmjs.org/gruntfile-editor/-/gruntfile-editor-0.1.1.tgz","integrity":"sha512-P1dKY69lMWh+VOYFrpLeAeYEM/9+54gRvDTN9WW+fSSnUwb2Cq0U4D/7gUhzwW9bR8qYlg3Iy3MDYNPC8o2IJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCHzBE1Y067ZcVDiev7kpJMmIYr1NJOKFlWoItpgAXokcCIQC2CMLx5ndXm46yIf5Fs9qLSmdVmL8+rpvAFj9USqbDyg=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"}]},"0.2.0":{"name":"gruntfile-editor","version":"0.2.0","description":"API to modify the content of a Gruntfile.js file","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","homepage":"https://github.com/SBoudrias/gruntfile-editor","keywords":["gruntfile","ast"],"main":"index.js","files":["index.js","default-gruntfile.js","LICENSE-MIT"],"scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git://github.com/SBoudrias/gruntfile-editor.git"},"bugs":{"url":"https://github.com/SBoudrias/gruntfile-editor/issues"},"dependencies":{"ast-query":"~0.2.3","lodash":"~2.4.1"},"_id":"gruntfile-editor@0.2.0","dist":{"shasum":"e1ccb700766b8c461662449a70ad4e7cabb022e2","tarball":"https://registry.npmjs.org/gruntfile-editor/-/gruntfile-editor-0.2.0.tgz","integrity":"sha512-D8bR/JI00j6Nu3x9+2huQOnB0+eZj/mlaTAzADQKJdTCSh/GknsYEYbzYUfE6LSyKIQJoo+8gzoEnnyrxfr29g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH/0/eBkcNt6WrNxIdSSB5tW/eiW0Mif6cpOiENSvmjQAiBzpW1l7jjZO9Lz//ECNFDbp+LJ5+z14J1yyzuAn4mg0w=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"}]},"1.0.0":{"name":"gruntfile-editor","version":"1.0.0","description":"API to modify the content of a Gruntfile.js file","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","keywords":["gruntfile","ast"],"files":["index.js","default-gruntfile.js"],"scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/SBoudrias/gruntfile-editor"},"dependencies":{"ast-query":"^1.0.1","lodash":"^3.2.0"},"devDependencies":{"mocha":"^2.1.0"},"gitHead":"2ef868e9da95adcc5a091fca5e3a20a6ca8ea35a","bugs":{"url":"https://github.com/SBoudrias/gruntfile-editor/issues"},"homepage":"https://github.com/SBoudrias/gruntfile-editor","_id":"gruntfile-editor@1.0.0","_shasum":"347df767c673599419e708fbbb8d03b8da1102c2","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.32","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"}],"dist":{"shasum":"347df767c673599419e708fbbb8d03b8da1102c2","tarball":"https://registry.npmjs.org/gruntfile-editor/-/gruntfile-editor-1.0.0.tgz","integrity":"sha512-O8q2C+7bINzFRs/qr2rjtI4PnXVoLinBdoVgB6pfxeH3Pprb1lF/M6GJpeB9jGlVRn7Vizc4Gbwf72REOaA28w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL8RF+9HA3WNUjSg9hcRRojgH7/v6oE3z/CRwvBbj85QIhAO1Uz5xZV24SzoPfdW8ytJflF5+eCcYGHid0mhNV8V+q"}]}},"1.1.0":{"name":"gruntfile-editor","version":"1.1.0","description":"API to modify the content of a Gruntfile.js file","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"license":"MIT","keywords":["gruntfile","ast"],"files":["index.js","default-gruntfile.js"],"scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git+https://github.com/sboudrias/gruntfile-editor.git"},"dependencies":{"ast-query":"^1.0.1","lodash":"^3.2.0"},"devDependencies":{"mocha":"^2.1.0"},"gitHead":"292efb4a21b84905ce998aa09f048873f94692e0","bugs":{"url":"https://github.com/sboudrias/gruntfile-editor/issues"},"homepage":"https://github.com/sboudrias/gruntfile-editor#readme","_id":"gruntfile-editor@1.1.0","_shasum":"53d882bbbaca4e9bc526c24268748b64210a4c00","_from":".","_npmVersion":"2.14.2","_nodeVersion":"0.12.7","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"dist":{"shasum":"53d882bbbaca4e9bc526c24268748b64210a4c00","tarball":"https://registry.npmjs.org/gruntfile-editor/-/gruntfile-editor-1.1.0.tgz","integrity":"sha512-+JqXitEN63nIo6zM+cD3FK9vroRukL00OKCjT+Kb2IqUxtSytOOEcsoNbLf+IdHwjBmzd2b07o3dGzhu4maUoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfHlMORK31eEGRrzQ+yCRXTuefhw/T83C7+C7aEKtKxQIgEOGMFb6NZFxsWE9GAzo87OCqLTMoSUQsdV47n/WqlpM="}]},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"}]},"1.2.0":{"name":"gruntfile-editor","version":"1.2.0","description":"API to modify the content of a Gruntfile.js file","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"files":["lib"],"main":"lib/index.js","keywords":["gruntfile","ast"],"license":"MIT","scripts":{"test":"gulp","prepublish":"gulp prepublish"},"repository":{"type":"git","url":"git+https://github.com/sboudrias/gruntfile-editor.git"},"dependencies":{"ast-query":"^1.0.1","lodash":"^4.6.1"},"devDependencies":{"mocha":"^2.1.0","eslint":"^2.1.0","eslint-config-xo-space":"^0.10.0","gulp":"^3.9.0","gulp-eslint":"^2.0.0","gulp-exclude-gitignore":"^1.0.0","gulp-line-ending-corrector":"^1.0.1","gulp-istanbul":"^0.10.3","gulp-mocha":"^2.0.0","gulp-plumber":"^1.0.0","gulp-nsp":"^2.1.0","gulp-coveralls":"^0.1.0"},"eslintConfig":{"extends":"xo-space","env":{"mocha":true},"rules":{"eqeqeq":[2,"allow-null"],"no-eq-null":0}},"gitHead":"750c1ecef4f5fc9c234de7e23c100a00c8e3a3b3","bugs":{"url":"https://github.com/sboudrias/gruntfile-editor/issues"},"homepage":"https://github.com/sboudrias/gruntfile-editor#readme","_id":"gruntfile-editor@1.2.0","_shasum":"169cc7ff532f0b2eb900eec351f7a2bf668302d0","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.9.0","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"dist":{"shasum":"169cc7ff532f0b2eb900eec351f7a2bf668302d0","tarball":"https://registry.npmjs.org/gruntfile-editor/-/gruntfile-editor-1.2.0.tgz","integrity":"sha512-OGok0Dhdbh5ZloA+/ABl2KqXBS4LzujeWZXh5QLekx54Z4LxaC8hTyNfnqsBVrJjFNJOfGRyQZLhQeZko7ovaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpD9Xowj1QWWCRdwlpBPEVl29v/NIw9CrAj7M0MvS91wIhANKgpg42ymIk5vdNvVlGMTfT8kFpg0vHHXE6OP4O18PT"}]},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/gruntfile-editor-1.2.0.tgz_1459233959485_0.7322243058588356"}},"1.2.1":{"name":"gruntfile-editor","version":"1.2.1","description":"API to modify the content of a Gruntfile.js file","author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"files":["lib"],"main":"lib/index.js","keywords":["gruntfile","ast"],"license":"MIT","scripts":{"test":"gulp","prepublish":"gulp prepublish"},"repository":{"type":"git","url":"git+https://github.com/sboudrias/gruntfile-editor.git"},"dependencies":{"ast-query":"^2.0.0","lodash":"^4.6.1"},"devDependencies":{"mocha":"^3.1.2","eslint":"^3.10.2","eslint-config-xo-space":"^0.15.0","gulp":"^3.9.0","gulp-eslint":"^3.0.1","gulp-exclude-gitignore":"^1.0.0","gulp-line-ending-corrector":"^1.0.1","gulp-istanbul":"^1.1.1","gulp-mocha":"^3.0.1","gulp-plumber":"^1.0.0","gulp-nsp":"^2.1.0","gulp-coveralls":"^0.1.0"},"eslintConfig":{"extends":"xo-space","env":{"mocha":true},"rules":{"eqeqeq":[2,"allow-null"],"no-eq-null":0,"no-mixed-operators":0,"quotes":0}},"gitHead":"85fcb6994f8fcc3775789e4c51c79cadbfe0d00e","bugs":{"url":"https://github.com/sboudrias/gruntfile-editor/issues"},"homepage":"https://github.com/sboudrias/gruntfile-editor#readme","_id":"gruntfile-editor@1.2.1","_shasum":"366fc1f93cbf045813e1448aef1da9f18289d5eb","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"sboudrias","email":"admin@simonboudrias.com"},"dist":{"shasum":"366fc1f93cbf045813e1448aef1da9f18289d5eb","tarball":"https://registry.npmjs.org/gruntfile-editor/-/gruntfile-editor-1.2.1.tgz","integrity":"sha512-c0FsVEH7VtoRYx8j8gLnorY4scvaJKuwmFldb4M+ppXyRIhEQf4N0Ff9Z1vzk1H5POHBOFj2X3DqpaGicBJIRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCA+zqW67vXvHr2U2a7fVgMXylSAQ6DP+Qp7o2aTVfqUwIgD3OLZvNxwJZC8baNTnMl9dHbAHZmrzDReJPn0G/tVXU="}]},"maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/gruntfile-editor-1.2.1.tgz_1479602026781_0.26689936709590256"}}},"readme":"Gruntfile Editor\n================\n\n[![npm](https://badge.fury.io/js/gruntfile-editor.svg)](http://badge.fury.io/js/gruntfile-editor) [![tests](https://travis-ci.org/SBoudrias/gruntfile-editor.svg?branch=master)](https://travis-ci.org/SBoudrias/gruntfile-editor) [![Coverage Status](https://coveralls.io/repos/github/SBoudrias/gruntfile-editor/badge.svg?branch=master)](https://coveralls.io/github/SBoudrias/gruntfile-editor?branch=master) [![dependencies](https://david-dm.org/SBoudrias/gruntfile-editor.svg?theme=shields.io)](https://david-dm.org/SBoudrias/gruntfile-editor)\n\nAn API to modify a `Gruntfile.js` content\n\nInstallation\n---------------\n\n```\nnpm install --save gruntfile-editor\n```\n\nExample\n---------------\n\n```javascript\nvar GruntfileEditor = require('gruntfile-editor');\nvar editor = new GruntfileEditor();\n\neditor.insertConfig('compass', '{ foo: \"bar\" }');\n\nfs.writeFileSync('Gruntfile.js', editor.toString());\n```\n\nAPI\n--------------\n\n### `new GruntfileEditor( content )`\n\nCreate a new editor instance. You can pass the content of the Gruntfile to edit to the constructor. If no content is provided, a default file structure is used.\n\n### `editor.insertConfig( name, config )`\n\nInsert a configuration block inside the `grunt.initConfig()` call.\n\n### `editor.registerTask( name, tasks )`\n\nRegister a task inside a named task group\n\n```javascript\neditor.registerTask('build', 'compass');\n// output: grunt.registerTask('build', ['compass']);\n\neditor.registerTask('build', ['compass', 'uglify']);\n// output: grunt.registerTask('build', ['compass', 'uglify']);\n```\n\nYou can specify an optional description.\n\n```javascript\neditor.registerTask('build', 'A task description', ['compass', 'uglify']);\n// output: grunt.registerTask('build', 'A task description', ['compass', 'uglify']);\n```\n\n### `editor.insertVariable( name, value )`\n\nInsert a variable to the top of the Gruntfile.\n\n```javascript\neditor.insertVariable('root', '\"project/foo\"');\n// output: var root = 'project/foo';\n```\n\n### `editor.prependJavaScript( code )`\n\nInsert a piece of arbritary JavaScript code to the top of the Gruntfile.\n\n```javascript\neditor.prependJavaScript('require(\\'load-grunt-tasks\\')(grunt);');\n// output: require('load-grunt-tasks')(grunt);\n```\n\n### `editor.loadNpmTasks( pluginName )`\n\nLoad a Grunt plugin.\n\n```javascript\neditor.loadNpmTasks('grunt-contrib-uglify');\n// output: grunt.loadNpmTasks(\"grunt-contrib-uglify\");\n\neditor.loadNpmTasks(['grunt-contrib-uglify', 'grunt-contrib-concat']);\n// output:\n// grunt.loadNpmTasks(\"grunt-contrib-concat\");\n// grunt.loadNpmTasks(\"grunt-contrib-uglify\");\n```\n\n\n### `editor.toString()`\n\nReturns the modified Gruntfile as a string.\n\nLicence\n-----------\n\nCopyright (c) 2012 Simon Boudrias (twitter: @vaxilart)  \nLicensed under the MIT license.\n","maintainers":[{"name":"sboudrias","email":"admin@simonboudrias.com"}],"time":{"modified":"2022-06-18T16:22:06.853Z","created":"2014-04-07T01:46:58.253Z","0.1.0":"2014-04-07T01:46:58.253Z","0.1.1":"2014-06-23T07:10:44.613Z","0.2.0":"2014-08-08T05:31:00.260Z","1.0.0":"2015-02-18T07:22:25.682Z","1.1.0":"2015-10-22T07:40:38.885Z","1.2.0":"2016-03-29T06:45:59.914Z","1.2.1":"2016-11-20T00:33:47.014Z"},"homepage":"https://github.com/sboudrias/gruntfile-editor#readme","keywords":["gruntfile","ast"],"repository":{"type":"git","url":"git+https://github.com/sboudrias/gruntfile-editor.git"},"author":{"name":"Simon Boudrias","email":"admin@simonboudrias.com"},"bugs":{"url":"https://github.com/sboudrias/gruntfile-editor/issues"},"license":"MIT","readmeFilename":"README.md","users":{"itonyyo":true}}