1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/common/vars/static-files-directory.injectable.ts
Jari Kolehmainen 4ac47fa795
Unify build fs layout (#6717)
* unify build fs layout

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* use currentApp path for static files

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* lint fix

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* absolute override path for tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2022-12-12 11:23:45 -05:00

21 lines
677 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import appPathsInjectable from "../app-paths/app-paths.injectable";
import joinPathsInjectable from "../path/join-paths.injectable";
const staticFilesDirectoryInjectable = getInjectable({
id: "static-files-directory",
instantiate: (di) => {
const joinPaths = di.inject(joinPathsInjectable);
const currentAppDir = di.inject(appPathsInjectable).currentApp;
return joinPaths(currentAppDir, "static");
},
});
export default staticFilesDirectoryInjectable;