1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add extension development instructions for Windows users (#1350)

* Add extension development instructions for Windows users

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>

Co-authored-by: steve richards <steve.james.richards@gmail.com>
This commit is contained in:
Lauri Nevala 2020-11-12 12:57:40 +02:00 committed by GitHub
parent 4222359bd6
commit 89f575701d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ In this topic, we'll teach you the fundamental concepts for building extensions.
Simple Lens extension that adds "Hello World" page to a cluster menu.
### Linux
### Setup the extension directory
First you will need to clone the [Lens Extension samples](https://github.com/lensapp/lens-extension-samples) repository to your local machine:
@ -16,12 +16,36 @@ 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**:
**Linux & MacOS**
```sh
mkdir -p ~/.k8slens/extensions
cd ~/.k8slens/extensions
ln -s <lens-extension-samples directory>/helloworld-sample helloworld-sample
ln -s lens-extension-samples/helloworld-sample helloworld-sample
```
**Windows**
Create the directory that Lens will monitor for user installed extensions:
```sh
mkdir C:\Users\<user>\.k8slens\extensions -force
cd C:\Users\<user>\.k8slens\extensions
```
If you have administrator rights, you can create symlink to the sample extension, in this case **helloworld-sample**:
```sh
cmd /c mklink /D helloworld-sample lens-extension-samples\helloworld-sample
```
Without administrator rights, you need to copy the extensions sample directory into `C:\Users\<user>\.k8slens\extensions`:
```
Copy-Item 'lens-extension-samples\helloworld-sample' 'C:\Users\<user>\.k8slens\extensions\helloworld-sample'
```
### Build the extension
To build the extension you can use `make` or run the `npm` commands manually:
```sh