mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Fix build of open-lens
- Remove need for using relative paths during build Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
6167ad2c25
commit
91354eae01
40 files changed
+284
-160
No files matched your search
@@ -9,6 +9,7 @@ import { JSDOM } from "jsdom";
|
||||
import path from "path";
|
||||
import sharp from "sharp";
|
||||
import arg from "arg";
|
||||
import assert from "assert";
|
||||
|
||||
const options = arg({
|
||||
"--input": String,
|
||||
@@ -41,11 +42,21 @@ const joinWithInitCwd = (relativePath: string): string => {
|
||||
return path.join(INIT_CWD, relativePath);
|
||||
};
|
||||
|
||||
const resolve = async (input: string) => {
|
||||
return (await import.meta.resolve?.(input))?.replace("file://", "");
|
||||
}
|
||||
|
||||
const size = options["--output-size"] ?? 16;
|
||||
const inputFile = joinWithInitCwd(assertOption("--input"));
|
||||
const outputFolder = joinWithInitCwd(assertOption("--output"));
|
||||
const noticeFile = joinWithInitCwd(assertOption("--notice-icon"));
|
||||
const spinnerFile = joinWithInitCwd(assertOption("--spinner-icon"));
|
||||
const inputFile = await resolve(assertOption("--input"));
|
||||
const noticeFile = await resolve(assertOption("--notice-icon"));
|
||||
const spinnerFile = await resolve(assertOption("--spinner-icon"));
|
||||
|
||||
assert(inputFile, "input file not found");
|
||||
assert(noticeFile, "notice icon file not found");
|
||||
assert(spinnerFile, "spinner icon file not found");
|
||||
|
||||
console.log(inputFile, noticeFile, spinnerFile)
|
||||
|
||||
const getSvgStyling = (colouring: "dark" | "light") => (
|
||||
`
|
||||
|
||||
Reference in new issue
Block a user