1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/extensions/extension-store.ts
Panu Horsmalahti dcf253e7d5
Add eslint rule padding-line-between-statements (#1593)
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
2020-12-02 09:55:52 +02:00

24 lines
532 B
TypeScript

import { BaseStore } from "../common/base-store";
import * as path from "path";
import { LensExtension } from "./lens-extension";
export abstract class ExtensionStore<T> extends BaseStore<T> {
protected extension: LensExtension;
async loadExtension(extension: LensExtension) {
this.extension = extension;
return super.load();
}
async load() {
if (!this.extension) { return; }
return super.load();
}
protected cwd() {
return path.join(super.cwd(), "extension-store", this.extension.name);
}
}