mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* 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>
21 lines
677 B
TypeScript
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;
|