{"name":"readme-badger","version":"0.1.2","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":"a94e50cd06afd9b7f332c207b035a62bf635a498","_id":"readme-badger@0.1.2","_shasum":"81b138df9723c733df6a27c7bd9caebd383e08a5","_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":"81b138df9723c733df6a27c7bd9caebd383e08a5","tarball":"http://registry-npm.ywwl.com/readme-badger/download/readme-badger-0.1.2.tgz","integrity":"sha512-z76ydvXMZGfgYU7qd9LOs4j/R3VY/a6YDtZdgG+dX5Va/Ew8DZ1JCKVz27obGOsnFhb3uQlUFCCzVlbWQPpoZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwQT3j6or9XeIlKESvpt0Bf+fMk9wh5KdPfR3v7wcKQAiEAoZptjp4ziSe+dvSsvLN9tbkhQwbdeEUZLXo/PNC6PpQ="}],"size":4784,"noattachment":false,"key":"/readme-badger/-/readme-badger-0.1.2.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":1425049105748,"_cnpm_publish_time":1425049105748,"dist-tags":{"latest":"0.3.0"}}