{"name":"readme-badger","version":"0.3.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"},"dependencies":{"balanced-match":"^1.0.0"},"gitHead":"fb03fe08a270b3f26a5313824d4244f209bb4f87","_id":"readme-badger@0.3.0","_npmVersion":"5.8.0","_nodeVersion":"6.14.1","_npmUser":{"name":"mlm","email":"contact@ericeastwood.com"},"dist":{"integrity":"sha512-+sMOLSs1imZUISZ2Rhz7qqVd77QtpcAPbGeIraFdgJmijb04YtdlPjGNBvDChTNtLbeQ6JNGQy3pOgslWfaP3g==","shasum":"87007f3c3e0c445e545134a305d8e3068fe9cd6e","tarball":"http://registry-npm.ywwl.com/readme-badger/download/readme-badger-0.3.0.tgz","fileCount":48,"unpackedSize":25115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1YrdCRA9TVsSAnZWagAAS0IP/jCWel9avJKNawlnUEX4\nQ0K7ix2UGEq0bUcU60MNJcaUwzUGsDzSXIqMEWtL0uPpL3lYtFfhTQziD2LG\nqhq89kUn7A2wf5UXjy9/MqItzGnyCvL7iRuUHm9Z2odxtnFX7ifPa98t8HIt\nb+poAyeW3XYeKaiUVTqwdQDvWQuRc+Pl9kIejPkAUmexTU5U5NYS4ZOj1kdi\ncqIwr0/R3VUrqikvHu2ohKocFH0k7PyB3522/KG9rNnJzsb+Gm6f/ey0eOM1\nDxCuVRAM9iCeEPZJ48h4qXM97Z2OinrTEljMmxuV2/zqXkqoJqIwDsuAVHSF\nM9wbDgrHkIxC/NLMytxoJw687yDTdI06DNUlolfgmwXSOgXzdpgBkoA1JE+h\nUyBrzQhX95KAJwmIjLRp1YIN/V5usBAZD5RI2+HC1RIlmsEst6GH6RjKlQVs\nVi2Skq2/susbPVUAzA7gXod2n3GuxWFhw7KE/2AJcyrT6UQBNFyE9TvXiCmP\nhX3gQseNAlUTQKxN9MuETcxsqDLdvT+Du8J9+M222JblNj5hGP/o12UqV5H/\ni+5KqxTxLRB77lIKeikOXSN1bfs4pZSK0lEReb0SaUMNoDO7MinhGZtFW2K4\nzCMyZmOJYCfGrr6+DxNhTf4HvbP5myuXpnfGotnu7RzvkZpYlcQ+5FmLZuem\nPDYO\r\n=uw+s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWyetXIZrdLMkFN70x00XAbX2eRFJ+52vPN5U9Zxpg3QIgcJEb18LoE3JXlv/gR1Rc2GVAxvmnCghAzirvGiqN+8Q="}],"size":5765,"noattachment":false,"key":"/readme-badger/-/readme-badger-0.3.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.3.0_1523944156438_0.16444501900321007"},"_hasShrinkwrap":false,"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":1523944156549,"_cnpm_publish_time":1523944156549,"dist-tags":{"latest":"0.3.0"}}