mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Deployed 22a8442a8 to master with MkDocs 1.1.2 and mike 0.5.5
This commit is contained in:
1 parent
7f5364a7c2
commit
e5b893bf73
192 files changed
+3513
-3360
No files matched your search
@@ -74,6 +74,11 @@
|
||||
<label class="md-overlay" for="__drawer"></label>
|
||||
<div data-md-component="skip">
|
||||
|
||||
|
||||
<a href="#publishing-extensions" class="md-skip">
|
||||
Skip to content
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div data-md-component="announce">
|
||||
|
||||
@@ -639,11 +644,69 @@
|
||||
|
||||
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="md-nav__link md-nav__link--active" for="__toc">
|
||||
Publishing Extensions
|
||||
<span class="md-nav__icon md-icon"></span>
|
||||
</label>
|
||||
|
||||
<a href="./" class="md-nav__link md-nav__link--active">
|
||||
Publishing Extensions
|
||||
</a>
|
||||
|
||||
|
||||
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="md-nav__title" for="__toc">
|
||||
<span class="md-nav__icon md-icon"></span>
|
||||
Table of contents
|
||||
</label>
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#places-to-host-your-extension" class="md-nav__link">
|
||||
Places To Host Your Extension
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Places To Host Your Extension">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#publishing-via-npm" class="md-nav__link">
|
||||
Publishing via NPM
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#publish-via-github-releases" class="md-nav__link">
|
||||
Publish via GitHub Releases
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#making-a-npm-tarball-of-your-extension" class="md-nav__link">
|
||||
Making a NPM Tarball of Your Extension
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
@@ -786,15 +849,105 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
|
||||
<div class="md-sidebar__scrollwrap">
|
||||
<div class="md-sidebar__inner">
|
||||
|
||||
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="md-nav__title" for="__toc">
|
||||
<span class="md-nav__icon md-icon"></span>
|
||||
Table of contents
|
||||
</label>
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#places-to-host-your-extension" class="md-nav__link">
|
||||
Places To Host Your Extension
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Places To Host Your Extension">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#publishing-via-npm" class="md-nav__link">
|
||||
Publishing via NPM
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#publish-via-github-releases" class="md-nav__link">
|
||||
Publish via GitHub Releases
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#making-a-npm-tarball-of-your-extension" class="md-nav__link">
|
||||
Making a NPM Tarball of Your Extension
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="md-content">
|
||||
<article class="md-content__inner md-typeset">
|
||||
|
||||
|
||||
|
||||
<h1>Publishing Extensions</h1>
|
||||
|
||||
|
||||
<h1 id="publishing-extensions">Publishing Extensions<a class="headerlink" href="#publishing-extensions" title="Permanent link">#</a></h1>
|
||||
<p>To be able to easily share extensions with users they need to be published somewhere.
|
||||
Lens currently only supports installing extensions from NPM tarballs.
|
||||
All hosted extensions must, therefore, be retrievable in a NPM tarball.</p>
|
||||
<h2 id="places-to-host-your-extension">Places To Host Your Extension<a class="headerlink" href="#places-to-host-your-extension" title="Permanent link">#</a></h2>
|
||||
<p>We recommend to host your extension somewhere on the web so that it is easy for people to search for and download it.
|
||||
We recommend either hosting it as an NPM package on https://www.npmjs.com or through GitHub releases.
|
||||
We recommend against using GitHub packages (https://github.com/features/packages) as it requires a GitHub token to access the package.</p>
|
||||
<h3 id="publishing-via-npm">Publishing via NPM<a class="headerlink" href="#publishing-via-npm" title="Permanent link">#</a></h3>
|
||||
<p>This is the easiest method of publishing as NPM comes built in with mechanism to get a link to download the package as a tarball.
|
||||
Once you have set up an account with NPM (https://www.npmjs.com/signup) and logged in with their CLI (<code>npm login</code>) you will be ready to publish.</p>
|
||||
<ul>
|
||||
<li>Run <code>npm version <major|minor|patch></code> to bump the version of your extension by the appropriate amount.</li>
|
||||
<li>Run <code>npm publish</code> to publish your extension to NPM</li>
|
||||
<li>Run <code>git push && git push --tags</code> to push the commit that NPM creates to your git remote.</li>
|
||||
</ul>
|
||||
<p>It is probably a good idea to put into your README.md the following instructions for your users to get the tarball download link.</p>
|
||||
<div class="highlight"><pre><span></span><code>npm view <extension-name> dist.tarball
|
||||
</code></pre></div>
|
||||
<p>This will output the link that they will need to give to Lens to install your extension.</p>
|
||||
<h3 id="publish-via-github-releases">Publish via GitHub Releases<a class="headerlink" href="#publish-via-github-releases" title="Permanent link">#</a></h3>
|
||||
<p>Another method of publishing your extensions is to do so with the releases mechanism built into GitHub.
|
||||
We recommend reading <a href="https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/managing-releases-in-a-repository">GitHub's Releases Documentation</a> for how to actually do the steps of a release.
|
||||
The following will be a quick walk through on how to make the tarball which will be the released file.</p>
|
||||
<h3 id="making-a-npm-tarball-of-your-extension">Making a NPM Tarball of Your Extension<a class="headerlink" href="#making-a-npm-tarball-of-your-extension" title="Permanent link">#</a></h3>
|
||||
<p>While this is necessary for hosting on GitHub releases, this is also the means for creating a tarball if you plan on hosting on a different file hosting platform.</p>
|
||||
<p>Say you have your project folder at <code>~/my-extension/</code> and you want to create an NPM package we need to do the following within your git repo:</p>
|
||||
<div class="highlight"><pre><span></span><code>npm pack
|
||||
</code></pre></div>
|
||||
<p>This will create a NPM tarball that can be hosted on Github Releases or any other publicly available file hosting service.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user