From 6e77e7eabb7d5408f97a28cae88a4056158c8bc9 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 9 Nov 2020 10:48:09 -0500 Subject: [PATCH] add some overview documentation to the getting started page (#1269) * add some overview documentation to the getting started page Signed-off-by: Sebastian Malton --- docs/extensions/get-started/overview.md | 20 +++++++++++++++++++ .../get-started/your-first-extension.md | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 docs/extensions/get-started/overview.md diff --git a/docs/extensions/get-started/overview.md b/docs/extensions/get-started/overview.md new file mode 100644 index 0000000000..4aba2940ff --- /dev/null +++ b/docs/extensions/get-started/overview.md @@ -0,0 +1,20 @@ +# Extension Development Overview + +This is a general overview to how the development of an extension will procede. For building extensions there will be a few things that you should have installed, and some that might help. + +### Required: +- [Node.js](https://www.nodejs.org/en/) +- [Git](https://www.git-scm.com/) +- Some sort of text editor, we recommend [VSCode](https://code.visualstudio.com/) +- We use [Webpack](https://www.webpack.js.org/) for compilation. All extension need to be at least compatable with a webpack system. + +### Recommened: +- + +All *Lens* extensions are javascript packages. We recommend that you program in [Typescript](https://www.typescriptlang.org/) because it catches quite a few easily to make errors around passing data around in javascript. + +*Lens* is a standard [Electron](https://www.electronjs.org/) application which both main and renderer processes. An extension is made up of two parts, one for each of *Lens*'s core processes. When an extension is loaded each part is loaded and then notified that it has been loaded. From there the extension can start doing is work. + +*Lens* uses [React](https://www.reactjs.org/) as it UI framework and even provides some of our own components for reuse by extensions. An extension is resonsible for the lifetime of any resources it spins up. If an extension's main part starts new processes they all must be stopped and cleaned up when the extension is deactivated or unloaded. + +See [Your First Extension](your-first-extension.md) to get started. diff --git a/docs/extensions/get-started/your-first-extension.md b/docs/extensions/get-started/your-first-extension.md index 0b057d2a87..e43103c008 100644 --- a/docs/extensions/get-started/your-first-extension.md +++ b/docs/extensions/get-started/your-first-extension.md @@ -1,6 +1,6 @@ # Your First Extension -In this topic, we'll teach you the fundamental concepts for building extensions. Make sure you have [Node.js](https://nodejs.org/en/) and [Git](https://git-scm.com/) installed.... +In this topic, we'll teach you the fundamental concepts for building extensions. ## Installing and Building the extension @@ -11,7 +11,7 @@ Simple Lens extension that adds "Hello World" page to a cluster menu. First you will need to clone the [Lens Extension samples](https://github.com/lensapp/lens-extension-samples) repository to your local machine: ```sh -git clone https://github.com/lensapp/lens-extension-samples.git +git clone https://github.com/lensapp/lens-extension-samples.git ``` Next you need to create a symlink from the directory that Lens will monitor for user installed extensions to the sample extension, in this case **helloworld-sample**: