Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeh committed May 3, 2019
1 parent 62a835f commit 717a071
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/gitbadges/favicon.ico"/><title>@magic-modules/git-badges</title><meta name="description" content="shows git badges for a github/gitlab repository."/><link rel="stylesheet" href="/gitbadges/magic.css"/></head><body><div id="magic"><div class="wrapper"><header class="main"><a class="logo-wrapper" href="/gitbadges/"><span class="logo-text">git-badges</span></a><nav class="Menu"><ul><li><a href="/gitbadges/#installation">installation</a></li><li><a href="/gitbadges/#require">require</a></li><li><a href="/gitbadges/#usage">usage</a></li><li><a href="/gitbadges/#demo">demo</a></li><li><a href="/gitbadges/#source">source</a></li></ul></nav></header><div class="page"><h1>@magic-modules/git-badges</h1><p>this is the <a href="https://github.com/magic-modules" target="_blank" rel="noopener">@magic-modules</a> GitBadges component. shows git badges for a github/gitlab repository.</p><h2 id="installation">installation</h2><p>installation is done using npm. for now, all magic modules are living on github and not on npm.</p><p>note the missing @ before magic-modules.</p><p>this is how we install npm modules from github.</p><div class="Pre light"><div class="menu"><button>dark</button><button>copy</button></div><pre><code class="line">npm install magic-modules/git-badges</code></pre></div><h2 id="require">require</h2><p>first add the component to the assets</p><div class="Pre light"><div class="menu"><button>dark</button><button>copy</button></div><pre><code class="line"><span class="comment">// assets/<span class="object">index</span>.<span class="property">js</span></span></code><code class="line"><span class="keyword">module</span>.<span class="keyword">exports</span> = {</code><code class="line"><span class="comment"> // ..other <span class="keyword">exports</span></span></code><code class="line"> <span class="colon">GitBadges</span>: <span class="keyword">require</span>(<span class="string">&#39;@magic-modules/git-badges&#39;</span>),</code><code class="line">}</code></pre></div><h2 id="usage">usage</h2><p>in a page/component, just pass the badge user/project string for those badges you want to show:</p><div class="Pre light"><div class="menu"><button>dark</button><button>copy</button></div><pre><code class="line">GitBadges({</code><code class="line"><span class="comment"> // show all badges,</span></code><code class="line"><span class="comment"> // insert project into the various urls of the badges</span></code><code class="line"> <span class="colon">project</span>: <span class="string">&#39;user/project&#39;</span>,</code><code class="line"></code><code class="line"><span class="comment"> // optional <span class="keyword">if</span> different to project above</span></code><code class="line"><span class="comment"> // every one of <span class="keyword">this</span> arguments can be <span class="boolean">false</span> to hide a badge</span></code><code class="line"> <span class="colon">npm</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>,</code><code class="line"> <span class="colon">travis</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>,</code><code class="line"> <span class="colon">coveralls</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>,</code><code class="line"> <span class="colon">appveyor</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>, <span class="comment">// - will automatically be removed from the user (appveyor needs that)</span></code><code class="line"> <span class="colon">greenkeeper</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>,</code><code class="line"></code><code class="line"><span class="comment"> // optional, master is <span class="keyword">default</span> value</span></code><code class="line"> <span class="colon">branch</span>: <span class="string">&#39;master&#39;</span>,</code><code class="line">})</code></pre></div><h2 id="demo">demo</h2><div class="Pre light"><div class="menu"><button>dark</button><button>copy</button></div><pre><code class="line">GitBadges(<span class="string">&#39;magic-modules/git-badges&#39;</span>)</code></pre></div><p>renders</p><ul class="GitBadges"><li><a href="https://www.npmjs.com/package/@magic-modules/git-badges" target="_blank" rel="noopener"><img src="https://img.shields.io/npm/v/@magic-modules/git-badges.svg" role="presentation" alt=""/></a></li><li><a href="https://travis-ci.com/magic-modules/git-badges" target="_blank" rel="noopener"><img src="https://travis-ci.com/magic-modules/git-badges.svg?branch=master" role="presentation" alt=""/></a></li><li><a href="https://ci.appveyor.com/project/magicmodules/git-badges/branch/master" target="_blank" rel="noopener"><img src="https://img.shields.io/appveyor/ci/magicmodules/git-badges/master.svg" role="presentation" alt=""/></a></li><li><a href="https://coveralls.io/github/magic-modules/git-badges" target="_blank" rel="noopener"><img src="https://coveralls.io/repos/github/magic-modules/git-badges/badge.svg" role="presentation" alt=""/></a></li><li><a href="https://greenkeeper.io" target="_blank" rel="noopener"><img src="https://badges.greenkeeper.io/magic-modules/git-badges.svg" role="presentation" alt=""/></a></li><li><a href="https://snyk.io/test/github/magic-modules/git-badges" target="_blank" rel="noopener"><img src="https://snyk.io/test/github/magic-modules/git-badges/badge.svg" role="presentation" alt=""/></a></li></ul><h2 id="source">source</h2><p>the source for this page is in the <a href="https://github.com/magic-modules/git-badges/tree/master/example" target="_blank" rel="noopener">example directory</a> and gets built and published to github using <a href="https://github.com/magic/core" target="_blank" rel="noopener">@magic/core</a></p></div><footer class="main"><div class="wrapper">made with a few bits of <a target="_blank" rel="noopener" href="https://github.com/magic/core">magic</a></div></footer></div></div><script src="/gitbadges/magic.js"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/gitbadges/favicon.ico"/><title>@magic-modules/git-badges</title><meta name="description" content="shows git badges for a github/gitlab repository."/><link rel="stylesheet" href="/gitbadges/magic.css"/></head><body><div id="magic"><div class="wrapper"><header class="main"><a class="logo-wrapper" href="/gitbadges/"><span class="logo-text">git-badges</span></a><nav class="Menu"><ul><li><a href="/gitbadges/#installation">installation</a></li><li><a href="/gitbadges/#require">require</a></li><li><a href="/gitbadges/#usage">usage</a></li><li><a href="/gitbadges/#demo">demo</a></li><li><a href="/gitbadges/#source">source</a></li></ul></nav></header><div class="page"><h1>@magic-modules/git-badges</h1><p>this is the <a href="https://github.com/magic-modules" target="_blank" rel="noopener">@magic-modules</a> GitBadges component. shows git badges for a github/gitlab repository.</p><h2 id="installation">installation</h2><p>installation is done using npm. for now, all magic modules are living on github and not on npm.</p><p>note the missing @ before magic-modules.</p><p>this is how we install npm modules from github.</p><div class="Pre light"><div class="menu"><button>dark</button><button>copy</button></div><pre><code class="line">npm install magic-modules/git-badges</code></pre></div><h2 id="require">require</h2><p>first add the component to the assets</p><div class="Pre light"><div class="menu"><button>dark</button><button>copy</button></div><pre><code class="line"><span class="comment">// assets/<span class="object">index</span>.<span class="property">js</span></span></code><code class="line"><span class="keyword">module</span>.<span class="keyword">exports</span> = {</code><code class="line"><span class="comment"> // ..other <span class="keyword">exports</span></span></code><code class="line"> <span class="colon">GitBadges</span>: <span class="keyword">require</span>(<span class="string">&#39;@magic-modules/git-badges&#39;</span>),</code><code class="line">}</code></pre></div><h2 id="usage">usage</h2><p>in a page/component, just pass the badge user/project string for those badges you want to show:</p><div class="Pre light"><div class="menu"><button>dark</button><button>copy</button></div><pre><code class="line">GitBadges({</code><code class="line"><span class="comment"> // show all badges,</span></code><code class="line"><span class="comment"> // insert project into the various urls of the badges</span></code><code class="line"> <span class="colon">project</span>: <span class="string">&#39;user/project&#39;</span>,</code><code class="line"></code><code class="line"><span class="comment"> // optional <span class="keyword">if</span> different to project above</span></code><code class="line"><span class="comment"> // every one of <span class="keyword">this</span> arguments can be <span class="boolean">false</span> to hide a badge</span></code><code class="line"> <span class="colon">npm</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>,</code><code class="line"> <span class="colon">travis</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>,</code><code class="line"> <span class="colon">coveralls</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>,</code><code class="line"> <span class="colon">appveyor</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>, <span class="comment">// - will automatically be removed from the user (appveyor needs that)</span></code><code class="line"> <span class="colon">greenkeeper</span>: <span class="string">&#39;user/project&#39;</span> || <span class="boolean">false</span>,</code><code class="line"></code><code class="line"><span class="comment"> // optional, master is <span class="keyword">default</span> value</span></code><code class="line"> <span class="colon">branch</span>: <span class="string">&#39;master&#39;</span>,</code><code class="line">})</code></pre></div><h2>gitlab / other git hosts</h2><p>to use gitlab or any other git host in the urls that need a git host to be set, simply pass a host prop to the GitBadges module</p><div class="Pre light"><div class="menu"><button>dark</button><button>copy</button></div><pre><code class="line">GitBages({ <span class="colon">project</span>: <span class="string">&#39;gitlab-org/gitlab-repo&#39;</span>, <span class="colon">host</span>: <span class="string">&#39;gitlab&#39;</span> })</code></pre></div><h2 id="demo">demo</h2><div class="Pre light"><div class="menu"><button>dark</button><button>copy</button></div><pre><code class="line">GitBadges(<span class="string">&#39;magic-modules/git-badges&#39;</span>)</code></pre></div><p>renders</p><ul class="GitBadges"><li><a href="https://www.npmjs.com/package/@magic-modules/git-badges" target="_blank" rel="noopener"><img src="https://img.shields.io/npm/v/@magic-modules/git-badges.svg" role="presentation" alt=""/></a></li><li><a href="https://travis-ci.com/magic-modules/git-badges" target="_blank" rel="noopener"><img src="https://travis-ci.com/magic-modules/git-badges.svg?branch=master" role="presentation" alt=""/></a></li><li><a href="https://ci.appveyor.com/project/magicmodules/git-badges/branch/master" target="_blank" rel="noopener"><img src="https://img.shields.io/appveyor/ci/magicmodules/git-badges/master.svg" role="presentation" alt=""/></a></li><li><a href="https://coveralls.io/github/magic-modules/git-badges" target="_blank" rel="noopener"><img src="https://coveralls.io/repos/github/magic-modules/git-badges/badge.svg" role="presentation" alt=""/></a></li><li><a href="https://greenkeeper.io" target="_blank" rel="noopener"><img src="https://badges.greenkeeper.io/magic-modules/git-badges.svg" role="presentation" alt=""/></a></li><li><a href="https://snyk.io/test/github/magic-modules/git-badges" target="_blank" rel="noopener"><img src="https://snyk.io/test/github/magic-modules/git-badges/badge.svg" role="presentation" alt=""/></a></li></ul><h2 id="source">source</h2><p>the source for this page is in the <a href="https://github.com/magic-modules/git-badges/tree/master/example" target="_blank" rel="noopener">example directory</a> and gets built and published to github using <a href="https://github.com/magic/core" target="_blank" rel="noopener">@magic/core</a></p></div><footer class="main"><div class="wrapper">made with a few bits of <a target="_blank" rel="noopener" href="https://github.com/magic/core">magic</a></div></footer></div></div><script src="/gitbadges/magic.js"></script></body></html>
Binary file modified docs/index.html.gz
Binary file not shown.
Loading

0 comments on commit 717a071

Please sign in to comment.