mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
29 lines
1.4 KiB
TypeScript
29 lines
1.4 KiB
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
|
|
import assert from "assert";
|
|
import path from "path";
|
|
import packageInfo from "../package.json";
|
|
|
|
export const isDevelopment = process.env.NODE_ENV !== "production";
|
|
export const mainDir = path.join(process.cwd(), "src", "main");
|
|
export const buildDir = path.join(process.cwd(), "static", "build");
|
|
export const extensionEntry = path.join(process.cwd(), "src", "extensions", "extension-api.ts");
|
|
export const extensionOutDir = path.join(process.cwd(), "packages", "extensions", "dist");
|
|
export const assetsFolderName = "assets";
|
|
export const rendererDir = path.join(process.cwd(), "src", "renderer");
|
|
export const appName = isDevelopment
|
|
? `${packageInfo.productName}Dev`
|
|
: packageInfo.productName;
|
|
export const htmlTemplate = path.resolve(rendererDir, "template.html");
|
|
export const publicPath = "/build/";
|
|
export const sassCommonVars = path.resolve(rendererDir, "components/vars.scss");
|
|
export const webpackDevServerPort = Number(process.env.WEBPACK_DEV_SERVER_PORT) || 9191;
|
|
export const additionalExternals = (process.env.LENS_BUILD_ADDITIONAL_WEBPACK_EXTERNALS || "")
|
|
.split(",")
|
|
.map(s => s.trim());
|
|
|
|
assert(Number.isInteger(webpackDevServerPort), "WEBPACK_DEV_SERVER_PORT environment variable must only be an integer");
|