Skip to content

Commit

Permalink
updated install instructions and log output
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejr committed Oct 29, 2020
1 parent a77440d commit b9540fc
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To install one of the samples follow the below instructions:
```sh
git clone https://github.com/lensapp/lens-extension-samples
mkdir -p ~/.k8slens/extensions
cp -pr ./lens-extensions-samples/<sample folder> ~/.k8slens/extensions/
cp -pr ./lens-extension-samples/<sample folder> ~/.k8slens/extensions/
cd ~/.k8slens/extensions/<sample folder>
npm install
npm run build
Expand Down
22 changes: 18 additions & 4 deletions helloworld-sample/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
# Lens "Hello World" Extension

Simple Lens extension that adds "hello-world" page to a cluster menu.
Simple Lens extension that adds "Hello World" page to a cluster menu.

## Install

```
```sh
mkdir -p ~/.k8slens/extensions
git clone https://github.com/lensapp/hello-world-extension.git ~/.k8slens/extensions/hello-world
git clone https://github.com/lensapp/lens-extension-samples.git
cp -pr lens-extension-samples/helloworld-sample ~/.k8slens/extensions
```

## Build

`npm run build`
To build the extension you can use `make` or run the `npm` commands manually:

```sh
cd ~/.k8slens/extensions/helloworld-sample
make build
```

OR

```sh
cd ~/.k8slens/extensions/helloworld-sample
npm install
npm run build
```

## Test

Expand Down
4 changes: 2 additions & 2 deletions helloworld-sample/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { LensMainExtension } from "@k8slens/extensions";

export default class ExampleExtensionMain extends LensMainExtension {
onActivate() {
console.log('hello-world activated');
console.log('helloworld-sample activated');
}

onDeactivate() {
console.log('hello-world de-activated');
console.log('helloworld-sample de-activated');
}
}
2 changes: 1 addition & 1 deletion helloworld-sample/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions helloworld-sample/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lens-hello-world",
"name": "lens-helloworld-sample",
"version": "0.0.1",
"description": "Lens hello-world",
"description": "Lens helloworld-sample",
"main": "dist/main.js",
"renderer": "dist/renderer.js",
"scripts": {
Expand Down

0 comments on commit b9540fc

Please sign in to comment.