{"_id":"@carpages/gulp-grunt","_rev":"1-b8ea94582bb3493b4c6bef72ae384c30","name":"@carpages/gulp-grunt","description":"Run grunt tasks from gulp","dist-tags":{"latest":"0.6.0"},"versions":{"0.6.0":{"name":"@carpages/gulp-grunt","description":"Run grunt tasks from gulp","version":"0.6.0","homepage":"http://github.com/gratimax/gulp-grunt","repository":{"type":"git","url":"git://github.com/gratimax/gulp-grunt.git"},"author":{"name":"gratimax","email":"max@ovsankin.com"},"main":"./index.js","keywords":["gulpfriendly","grunt"],"dependencies":{"grunt":"^1.0.1"},"devDependencies":{"chai":"^3.3.0","eslint":"^3.19.0","eslint-config-carpages":"^0.2.0","gulp":"^3.9.0","gulp-mocha":"^4.3.1","loud-rejection":"^1.6.0","mocha":"^3.4.2"},"scripts":{"test":"mocha"},"engines":{"node":">= 4.0.0"},"license":"MIT","gitHead":"007e683cb95d8d78d4cfe6990ae2de1b890b1d8e","bugs":{"url":"https://github.com/gratimax/gulp-grunt/issues"},"_id":"@carpages/gulp-grunt@0.6.0","_npmVersion":"5.3.0","_nodeVersion":"8.1.4","_npmUser":{"name":"jandrews","email":"jeffandrews@me.com"},"dist":{"integrity":"sha512-E91aGDozUQ4Y0z5D+77ZISxghV4bPfti/wcWA3LW2tLcrUb0yQfecKnTRT+hhzoodW4Jia2HVspVEpct+cEFqw==","shasum":"8be39007bdea20a8ac1cc3092c32f6a9cd3c8e83","tarball":"https://registry.npmjs.org/@carpages/gulp-grunt/-/gulp-grunt-0.6.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGXWllE3qpr2fsroU9l4mwX5hJHaFeKVlg5K5iKEAlsGAiB1cTgpkA14mWN9dSdinPEXxUIcbrONYiyGYo8ohDtgfg=="}]},"maintainers":[{"name":"jandrews","email":"jeffandrews@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-grunt-0.6.0.tgz_1500072280324_0.8941179066896439"}}},"readme":"# [gulp](https://github.com/gulpjs/gulp)-grunt\n<img align=\"right\" height=\"300\" src=\"http://i.imgur.com/05jWZVG.png\">\n\n#### Run grunt tasks from gulp\n[![NPM version](https://badge.fury.io/js/gulp-grunt.png)](https://npmjs.org/package/gulp-grunt)\n[![travis build](https://api.travis-ci.org/gratimax/gulp-grunt.png)](https://travis-ci.org/gratimax/gulp-grunt)\n[![dependencies](https://david-dm.org/gratimax/gulp-grunt.png)](https://david-dm.org/gratimax/gulp-grunt)\n\nWhat if your favorite grunt plugin isn't available for gulp yet?\nDon't fret, there is nothing to worry about!\nWhy don't you just hook in your grunt configuration?\n\nThis plugin is a bit different from most other gulp plugins.\nYou cannot use it inline, because it does not create a stream.\nRather, use it at the top of your gulpfile, calling it with your gulp as an argument.\nThis classifies gulp-grunt as _gulpfriendly_, not a gulpplugin.\n\n## Example usage\n```js\nvar gulp = require('gulp');\nrequire('gulp-grunt')(gulp); // add all the gruntfile tasks to gulp\n\n// continue defining tasks...\ngulp.task('do-this', function() {\n  ...\n});\n\n// run them like any other task\ngulp.task('default', [\n  // run complete grunt tasks\n  'grunt-minify',\n  'grunt-test',\n  // or run specific targets\n  'grunt-sass:dist',\n  'grunt-browserify:dev'\n]);\n```\nNote that all the grunt tasks that were added begin with the prefix 'grunt-'.\nThis is for usability, so that your grunt tasks do not clash with your gulp tasks.\nAlso note that `require('gulp-grunt')(gulp)` does not have to be at the top of your file.\nIt could very well be at the bottom, except that then it could possibly overwrite some of your\ngulp tasks.\n\nTo run specific targets, use the regular grunt syntax `[task]:[target]`, as in the example above. (To learn more about Grunt targets, check out [the Grunt documentation](http://gruntjs.com/configuring-tasks#task-configuration-and-targets).)\n\n## Functions\n\n### gulp-grunt()\n__Takes__ `(gulp, options)`\n\nConfiguration is done with the function call:\n```js\nrequire('gulp-grunt')(gulp, {\n  base: ...,\n  prefix: ...\n});\n```\nThis function appends all the grunt tasks it has found to your gulp object as normal gulp tasks.\n\n#### gulp\nYour gulp object that you imported with the code:\n```js\nvar gulp = require('gulp');\n```\nPass it in and gulp-grunt will add all the tasks.\n\n#### options\n`options` is the configuration object you pass in.\n\n#### options.base\nThis tells grunt where to look for your gruntfile.\nSet it to some absolute path.\nThis may require you to use `path.join` for relative paths:\n```js\nrequire('gulp-grunt')(gulp, {\n  base: require('path').join(__dirname, 'yourrelativepathhere')\n});\n```\n\n#### options.prefix\nThis tells gulp-grunt how to prefix your tasks.\nFor instance, if in the gruntfile you define the tasks 'minify' and 'compile',\nand if you pass gulp-grunt this configuration:\n```js\nrequire('gulp-grunt')(gulp, {\n  prefix: 'theknightswhosay-'\n})\n```\nThe grunt tasks can be called from gulp, except they would have the prefix, so\n'theknightswhosay-minify' and 'theknightswhosay-compile'.\n\nYou can simply pass in an empty string(`''`) if you wish to have no prefix.\n\n#### options.verbose\nIf this option is enabled(true), then gulp-grunt will tell you when it starts running a Grunt task or stops it.\nThis option is mainly for debugging.\n\n#### options.force\nIf this option set to `true`, grunt task will never fail, but just give you a warning instead.\n\n#### default options\n\n```js\n{\n  base: null, // this is just the directory that your Gulpfile is in\n  prefix: 'grunt-',\n  verbose: false,\n  force: true\n}\n```\n\n### gulp-grunt.tasks()\n__Takes__ `(options)`\n\nThis just returns all the grunt tasks found, along with their associated functions.\nCalling is essentially the same as with the main function:\n```js\nvar gulp_grunt = require('gulp-grunt')\nvar tasks = gulp_grunt.tasks({\n  base: ...,\n  prefix: ...\n});\n```\nOutput is something like:\n```js\n{\n  'grunt-test': [Function],\n  'grunt-minify': [Function]\n  // etc...\n}\n```\n\n#### options\nThis object is the exact same as for [gulp-grunt()](#gulp-grunt-1) above.\nThis tells gulp-grunt what prefix to use and what base to search for, among other things.\n\n***\n\nHave fun grunting and gulping! :D\n","maintainers":[{"name":"jandrews","email":"jeffandrews@me.com"}],"time":{"modified":"2022-04-04T21:58:53.663Z","created":"2017-07-14T22:44:40.465Z","0.6.0":"2017-07-14T22:44:40.465Z"},"homepage":"http://github.com/gratimax/gulp-grunt","keywords":["gulpfriendly","grunt"],"repository":{"type":"git","url":"git://github.com/gratimax/gulp-grunt.git"},"author":{"name":"gratimax","email":"max@ovsankin.com"},"bugs":{"url":"https://github.com/gratimax/gulp-grunt/issues"},"license":"MIT","readmeFilename":"README.md"}