{"name":"readme-badger","version":"0.1.0","description":"Inserts badges into GitHub READMEs","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test"},"repository":{"type":"git","url":"https://github.com/gitterHQ/readme-badger.git"},"keywords":["badge","badger","github","readme"],"author":{"name":"Andy Trevorah"},"license":"MIT","bugs":{"url":"https://github.com/gitterHQ/readme-badger/issues"},"homepage":"https://github.com/gitterHQ/readme-badger","devDependencies":{"mocha":"1.20.1"},"gitHead":"21e68267fe4c53b0ca2b81117b8152d153d92cae","_id":"readme-badger@0.1.0","_shasum":"7fdcd325f941c04d4b69d2231a2aac11601985c3","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"trevorah","email":"a.trevorah@gmail.com"},"maintainers":[{"name":"trevorah","email":"a.trevorah@gmail.com"}],"dist":{"shasum":"7fdcd325f941c04d4b69d2231a2aac11601985c3","tarball":"http://registry-npm.ywwl.com/readme-badger/download/readme-badger-0.1.0.tgz","integrity":"sha512-25iis+lsrEA8MH0QvOh9T5WQPjdO6oAxkoUZ+y0DtbE/10S02SiA9ZhgiaDu8giBfO2QWDj7jktXJ++8Pr5GWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICPb7XL5C9fBy5ifVTcjJq2fzrKIXrKlwF+OR4trUPY3AiBy9TFPDOso8pGAXoQSAxz+3miZvka2rzqHA1V+z859Kw=="}],"size":4246,"noattachment":false,"key":"/readme-badger/-/readme-badger-0.1.0.tgz"},"readme":"readme-badger\n=============\n\n[![Build Status](https://travis-ci.org/gitterHQ/readme-badger.svg?branch=master)](https://travis-ci.org/gitterHQ/readme-badger)\n\nWhizzy badges in your READMEs.\n\nInstall\n-------\n\n`npm install readme-badger`\n\nHow To Use\n----------\n\n### `addBadge(content, fileExt, imageUrl, linkUrl, altText)`\n\nReturns the content but with a new badge inserted.\n\n* `content`: the text content of a README.\n* `fileExt`: the file extension of the README (md, textile, rdoc etc).\n* `imageUrl`: the image url for the badge.\n* `linkUrl`: the url for the badge to link to.\n* `altText`: the alternative if images aren't visible. This will be used on its own for plaintext READMEs, so include a url in the text.\n\n### `hasImageSupport(fileExt)`\n\nReturns true/false depending on whether the format (`fileExt`) will render a badge image or just the altText.\n\n* `fileExt`: the file extension of the README (md, textile, rdoc etc)\n\nExample\n-------\n```javascript\nvar badger = require('readme-badger');\n\nvar readme = '# My Lovely Library\\n' +\n             '\\n' +\n             '## Features\\n';\nvar imageUrl = 'https://badges.gitter.im/Join%20Chat.svg';\nvar linkUrl = 'https://gitter.im/gitterHQ/gitter';\nvar altText = 'Join the chat at https://gitter.im/gitterHQ/gitter';\n\nvar readmeWithBadge = badger.addBadge(readme, 'md', imageUrl, linkUrl, altText);\n\nconsole.log(readmeWithBadge);\n// # My Lovely Library\n//\n// [![Join the chat at https://gitter.im/gitterHQ/gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gitterHQ/gitter)\n//\n// ## Features\n// ...\n\n```\n\nFormat (`fileExt`) Support\n--------------\n\nreadme-badger supports almost all of the [GitHub README markups](https://github.com/github/markup#markups):\n* [markdown, mdown, mkdn, md](http://daringfireball.net/projects/markdown/)\n* [textile](http://www.textism.com/tools/textile/)\n* [rdoc](http://rdoc.sourceforge.net/)\n* [org](http://orgmode.org/)\n* [mediawiki, wiki](http://www.mediawiki.org/wiki/Help:Formatting)\n* [rst](http://docutils.sourceforge.net/rst.html)\n* [asciidoc, adoc, asc](http://asciidoc.org/)\n* [pod](http://search.cpan.org/dist/perl/pod/perlpod.pod)\n\nIt will also failover to inserting the `altText` at the bottom of the README for any format that doesnt have image link support (creole, txt or anything else).\n\nBuilding Locally\n----------------\n\n1. `git clone git@github.com:gitterHQ/readme-badger.git`\n2. `cd readme-badger`\n3. `npm install`\n4. `npm test`\n\nLicense\n-------\n\nMIT\n","publish_time":1422354569464,"_cnpm_publish_time":1422354569464,"dist-tags":{"latest":"0.3.0"}}