{
  "name": "logfile-grunt",
  "version": "0.1.5",
  "description": "Simple text file logging for Grunt and task output.",
  "homepage": "https://github.com/brutaldev/logfile-grunt",
  "bugs": {
    "url": "https://github.com/brutaldev/logfile-grunt/issues"
  },
  "author": {
    "name": "Werner van Deventer",
    "email": "werner@brutaldev.com",
    "url": "http://brutaldev.com"
  },
  "keywords": [
    "grunt",
    "log",
    "file",
    "logfile",
    "logging",
    "logger",
    "logfile-grunt"
  ],
  "files": [
    "logfile-grunt.js"
  ],
  "main": "logfile-grunt.js",
  "engines": {
    "node": ">= 0.8.0"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/brutaldev/logfile-grunt.git"
  },
  "licenses": [
    {
      "type": "MIT",
      "url": "https://github.com/brutaldev/logfile-grunt/blob/master/LICENSE"
    }
  ],
  "dependencies": {
    "hooker": "~0.2.3"
  },
  "devDependencies": {
    "grunt-contrib-jshint": "~0.8.0",
    "grunt-contrib-nodeunit": "~0.2.2",
    "grunt-contrib-clean": "~0.5.0",
    "grunt": "~0.4.0",
    "jshint-stylish": "~0.1.3"
  },
  "peerDependencies": {
    "grunt": "~0.4.0"
  },
  "scripts": {
    "test": "grunt test"
  },
  "readme": "# logfile-grunt\r\n\r\n[![Build Status](https://travis-ci.org/brutaldev/logfile-grunt.png?branch=master)](https://travis-ci.org/brutaldev/logfile-grunt)\r\n[![Dependencies](https://david-dm.org/brutaldev/logfile-grunt.png)](https://david-dm.org/brutaldev/logfile-grunt)\r\n[![DevDependencies](https://david-dm.org/brutaldev/logfile-grunt/dev-status.png)](https://david-dm.org/brutaldev/logfile-grunt#info=devDependencies&view=table)\r\n[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)\r\n\r\n\r\n> Simple text file logging for Grunt and task output.\r\n\r\n## Getting Started\r\nThis plugin requires Grunt `~0.4.0`\r\n\r\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\r\n\r\n```shell\r\nnpm install logfile-grunt --save-dev\r\n```\r\n\r\nOnce the plugin has been installed, the simplest way to enable it inside your [Gruntfile](http://gruntjs.com/sample-gruntfile) is with this line of JavaScript:\r\n\r\n```js\r\nrequire('logfile-grunt')(grunt);\r\n```\r\n\r\n[Grunt](http://gruntjs.com/) output and task information that is usually logged to console will also be logged file. Don't worry, all your console information will still be available, it will additionally be written to file as well.\r\n\r\n### Options\r\nThe plugin can take an options object to enable you to override things like the path of the log file and whether to clear it each time you run [Grunt](http://gruntjs.com/).\r\n\r\n#### options.filePath\r\nType: `String`\r\nDefault value: `'./logs/grunt.log'`\r\n\r\nA file name (and path) where your log file will be created.\r\n\r\n#### options.clearLogFile\r\nType: `Boolean`\r\nDefault value: `false`\r\n\r\nSetting `clearLogFile` to `true` will ensure the log file emptied each time you run this task. Setting `clearLogFile` to `false` will continue to append to the same log file each time [Grunt](http://gruntjs.com/) is executed.\r\n\r\n#### options.keepColors\r\nType: `Boolean`\r\nDefault value: `false`\r\n\r\nSetting `keepColors` to `true` will retain the console color codes and write them to the log file. Note that the console color codes can often make the text log difficult to read.\r\n\r\n### Usage Examples\r\n\r\n#### Default Options\r\nIn this example with no options, all the output you see in the console from both Grunt and running tasks will also be written to `./logs/grunt.log`. The log file text will have console color codes stripped out by default as well.\r\n\r\n```js\r\nrequire('logfile-grunt')(grunt);\r\n```\r\n\r\n#### Custom File Option\r\nIn this example, you can provide a custom file path for your log file by providing a name and path in the options object.\r\n\r\n```js\r\nrequire('logfile-grunt')(grunt, { filePath: './logs/MyCustomLogs.txt' });\r\n```\r\n\r\n#### Clear Log Option\r\nIn this example, the custom log file will be cleared on every time [Grunt](http://gruntjs.com/) is executed. This is useful for release build log files for example.\r\n\r\n```js\r\nrequire('logfile-grunt')(grunt, { filePath: './logs/ClearedOnEveryRun.log', clearLogFile: true });\r\n```\r\n\r\n#### Keep Colors Option\r\nIn this example, the log file will retain the console color codes used by [Grunt](http://gruntjs.com/).\r\n\r\n```js\r\nrequire('logfile-grunt')(grunt, { keepColors: true });\r\n```\r\n\r\n#### Task Specific Logs\r\nThe normal usage would be to `require` the plugin at the beginning of your [Gruntfile](http://gruntjs.com/sample-gruntfile) so that all output will be logged no matter what task you run. If you need to send output to different log files depending on the task, you will need to performs the `require` inside a `taskFunction` which can be provided when you [register a task](http://gruntjs.com/api/grunt.task#creating-tasks).\r\n\r\n```js\r\ngrunt.task.registerTask('devlog', 'Keep appending everything to a log file.', function() {\r\n  require('logfile-grunt')(grunt, { filePath: './logs/MyDevLog.txt', clearLogFile: false });\r\n});\r\n\r\ngrunt.task.registerTask('buildlog', 'Create a new release build log files on each run.', function() {\r\n  require('logfile-grunt')(grunt, { filePath: './dist/build.log', clearLogFile: true });\r\n});\r\n\r\n// Then include these tasks inside other tasks.\r\n// Make sure it's the first one so that all output is written to the log file.\r\ntask.registerTask('default', ['devlog', 'jshint', 'qunit', 'concat', 'uglify']);\r\ntask.registerTask('dist', ['buildlog', 'concat:dist', 'uglify:dist']);\r\n```\r\n\r\n\r\n## Contributing\r\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\r\n\r\n## Release History\r\n * 2014-01-25  -  v0.1.0  -  Initial release.\r\n * 2014-01-25  -  v0.1.1  -  Official release.\r\n * 2014-01-27  -  v0.1.2  -  Updated NPM keywords.\r\n * 2014-01-28  -  v0.1.3  -  Fix crash when presented with a Buffer in the stdout stream. Works even better now printing any arb stuff coming through the stream.\r\n * 2014-03-10  -  v0.1.4  -  Added option to keep console colors in the log output.\n * 2014-03-10  -  v0.1.5  -  Keep NPM version numbers happy.\r\n\r\n## License\r\nCopyright (c) 2014 Werner van Deventer. Licensed under the MIT license.\r\n",
  "readmeFilename": "README.md",
  "_id": "logfile-grunt@0.1.5",
  "dist": {
    "shasum": "46578837fd0c98af3fd9c7d4dbf4f237d2e636ed"
  },
  "_from": "logfile-grunt@",
  "_resolved": "https://registry.npmjs.org/logfile-grunt/-/logfile-grunt-0.1.5.tgz"
}
