{"name":"readme-badger","version":"0.2.0","description":"Inserts badges into GitHub READMEs","main":"index.js","directories":{"test":"test"},"scripts":{"test":"mocha test/**/*.js"},"repository":{"type":"git","url":"git+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":"d8b1534b2348edcf558d2856430bb867f2ed272a","_id":"readme-badger@0.2.0","_shasum":"1fdb448248fb5d40d8856fbd269dd8b927d1aff8","_from":".","_npmVersion":"2.15.11","_nodeVersion":"6.8.1","_npmUser":{"name":"mlm","email":"contact@ericeastwood.com"},"dist":{"shasum":"1fdb448248fb5d40d8856fbd269dd8b927d1aff8","tarball":"http://registry-npm.ywwl.com/readme-badger/download/readme-badger-0.2.0.tgz","integrity":"sha512-pAvoKC/+f24PmC9v0DebwcXScysA73pS5zGmzuyj1BySm3wL6oJ+er5ltg7nil7AKFv14p0wBWPgR+GI32+k7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJJHX7GnC75jvnGtH63YtismRmMn7OvxkyMyCRlIzHsgIgGpe92RjAL8sBnjjh+kZrond4gyHLT8Ga8tcD5Zi/7BU="}],"size":4697,"noattachment":false,"key":"/readme-badger/-/readme-badger-0.2.0.tgz"},"maintainers":[{"name":"mlm","email":"contact@ericeastwood.com"},{"name":"trevorah","email":"a.trevorah@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/readme-badger-0.2.0.tgz_1496732873033_0.07510168571025133"},"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":1496732873937,"_cnpm_publish_time":1496732873937,"dist-tags":{"latest":"0.3.0"}}