You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
8.5 KiB

  1. {
  2. "name": "grunt-bower-task",
  3. "description": "Install Bower packages.",
  4. "version": "0.2.3",
  5. "homepage": "https://github.com/yatskevich/grunt-bower-task",
  6. "author": {
  7. "name": "Ivan Yatskevich",
  8. "email": "ivan@yatskevich.com"
  9. },
  10. "contributors": [
  11. {
  12. "name": "Maksim Horbachevsky",
  13. "url": "https://github.com/fantactuka"
  14. }
  15. ],
  16. "repository": {
  17. "type": "git",
  18. "url": "git://github.com/yatskevich/grunt-bower-task.git"
  19. },
  20. "bugs": {
  21. "url": "https://github.com/yatskevich/grunt-bower-task/issues"
  22. },
  23. "licenses": [
  24. {
  25. "type": "MIT",
  26. "url": "https://github.com/yatskevich/grunt-bower-task/blob/master/LICENSE-MIT"
  27. }
  28. ],
  29. "main": "Gruntfile.js",
  30. "engines": {
  31. "node": ">= 0.8.0"
  32. },
  33. "scripts": {
  34. "test": "grunt test"
  35. },
  36. "dependencies": {
  37. "bower": "~0.9.2",
  38. "lodash": "~0.10.0",
  39. "rimraf": "~2.0.2",
  40. "wrench": "~1.4.3",
  41. "colors": "~0.6.0-1",
  42. "async": "~0.1.22"
  43. },
  44. "devDependencies": {
  45. "grunt-contrib-jshint": "0.3.0",
  46. "grunt-contrib-nodeunit": "~0.1.2",
  47. "grunt": "~0.4.1",
  48. "grunt-cli": "~0.1.6"
  49. },
  50. "keywords": [
  51. "gruntplugin",
  52. "bower"
  53. ],
  54. "readme": "# grunt-bower-task [![Build Status](https://travis-ci.org/yatskevich/grunt-bower-task.png)](https://travis-ci.org/yatskevich/grunt-bower-task)\n\n> Install Bower packages. Smartly.\n\n## Getting Started\n_If you haven't used [grunt][] before, be sure to check out the [Getting Started][] guide._\n\nPlease note, this plugin works **only with grunt 0.4+**. If you are using grunt 0.3.x then consider an [upgrade to 0.4][].\n\nFrom the same directory as your project's [Gruntfile][Getting Started] and [package.json][], install this plugin with the following command:\n\n```bash\nnpm install grunt-bower-task --save-dev\n```\n\nOnce that's done, add this line to your project's Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-bower-task');\n```\n\nIf the plugin has been installed correctly, running `grunt --help` at the command line should list the newly-installed plugin's task or tasks. In addition, the plugin should be listed in package.json as a `devDependency`, which ensures that it will be installed whenever the `npm install` command is run.\n\n[grunt]: http://gruntjs.com/\n[Getting Started]: https://github.com/gruntjs/grunt/wiki/Getting-started\n[package.json]: https://npmjs.org/doc/json.html\n[upgrade to 0.4]: https://github.com/gruntjs/grunt/wiki/Upgrading-from-0.3-to-0.4\n\n## Grunt task for Bower\n\n### Overview\nIn your project's Gruntfile, add a section named `bower` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n bower: {\n install: {\n //just run 'grunt bower:install' and you'll see files from your Bower packages in lib directory\n }\n },\n})\n```\n\n### Options\n\n#### options.targetDir\nType: `String`\nDefault value: `./lib`\n\nA directory where you want to keep your Bower packages.\n\n### options.install\nType: `Boolean`\nDefault value: `true`\n\nWhether you want to run bower install task itself (e.g. you might not want to do this each time on CI server).\n\n### options.cleanTargetDir\nType: `Boolean`\nDefault value: `false`\n\nWill clean target dir before running install.\n\n### options.cleanBowerDir\nType: `Boolean`\nDefault value: `false`\n\nWill remove bower's dir after copying all needed files into target dir.\n\n### options.copy\nType: `Boolean`\nDefault value: `true`\n\nCopy Bower packages to target directory.\n\n#### options.cleanup\nType: `boolean`\nDefault value: `undefined`\n\n**NOTE:** If set to true or false then both `cleanBowerDir` & `cleanTargetDir` are set to the value of `cleanup`.\n\n#### options.layout\nType: `string` or `function`\nDefault value: `byType`\n\nThere are two built-in named layouts: `byType` and `byComponent`.\n\n`byType` layout will produce the following structure:\n\n```\nlib\n|-- js\n| |- bootstrap\n| \\- require\n|-- css\n \\- bootstrap\n```\nwhere `js`, `css` come from `exportsOverride` section described below.\n\n`byComponent` will group assets by type under component name:\n\n```\nlib\n|-- bootstrap\n| |- js\n| \\- css\n|-- require\n \\- js\n```\n\nIf you need to support custom layout then you can specify `layout` as a function of `type` and `component`:\n\n```js\nvar path = require('path');\n\ngrunt.initConfig({\n bower: {\n install: {\n options: {\n layout: function(type, component) {\n var renamedType = type;\n if (type == 'js') renamedType = 'javascripts';\n else if (type == 'css') renamedType = 'stylesheets';\n\n return path.join(component, renamedType);\n }\n }\n }\n }\n});\n```\n\n#### options.verbose\nType: `boolean`\nDefault value: `false`\n\nThe task will provide more (debug) output when this option is set to `true`. You can also use `--verbose` when running task for same effect.\n\n### Usage Examples\n\n#### Default Options\nDefault options are good enough if you want to install Bower packages and keep only `\"main\"` files (as specified by package's `component.json`) in separate directory.\n\n```js\ngrunt.initConfig({\n bower: {\n install: {\n options: {\n targetDir: './lib',\n layout: 'byType',\n
  55. "readmeFilename": "README.md",
  56. "_id": "grunt-bower-task@0.2.3",
  57. "dist": {
  58. "shasum": "3ad07d91fa63d0a8e9e09e00d433cdd583b72650"
  59. },
  60. "_from": "grunt-bower-task@~0.2.2",
  61. "_resolved": "https://registry.npmjs.org/grunt-bower-task/-/grunt-bower-task-0.2.3.tgz"
  62. }