Use '@' path mapping (#94)

This commit is contained in:
Chenlei Hu
2024-07-05 22:04:29 -04:00
committed by GitHub
parent b676604f81
commit d1934f27c8
17 changed files with 20 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
import { app } from "../../scripts/app";
import { $el } from "../../scripts/ui";
import type { ColorPalettes } from "/types/colorPalette";
import type { ColorPalettes } from "@/types/colorPalette";
import { LGraphCanvas, LiteGraph } from "@comfyorg/litegraph";
// Manage color palettes

View File

@@ -1,8 +1,8 @@
import { app } from "../../scripts/app";
import { api } from "../../scripts/api";
import type { IWidget } from "@comfyorg/litegraph";
import type { DOMWidget } from "/scripts/domWidget";
import { ComfyNodeDef } from "/types/apiTypes";
import type { DOMWidget } from "@/scripts/domWidget";
import { ComfyNodeDef } from "@/types/apiTypes";
type FolderType = "input" | "output" | "temp";

View File

@@ -1,5 +1,5 @@
import { app } from "../../scripts/app";
import { ComfyNodeDef } from "/types/apiTypes";
import { ComfyNodeDef } from "@/types/apiTypes";
// Adds an upload button to the nodes

View File

@@ -1,10 +1,10 @@
import { ComfyWorkflowJSON } from "types/comfyWorkflow";
import { ComfyWorkflowJSON } from "@/types/comfyWorkflow";
import {
HistoryTaskItem,
PendingTaskItem,
RunningTaskItem,
ComfyNodeDef,
} from "/types/apiTypes";
} from "@/types/apiTypes";
interface QueuePromptRequestBody {
client_id: string;

View File

@@ -14,12 +14,12 @@ import { addDomClippingSetting } from "./domWidget";
import { createImageHost, calculateImageGrid } from "./ui/imagePreview";
import { DraggableList } from "./ui/draggableList";
import { applyTextReplacements, addStylesheet } from "./utils";
import type { ComfyExtension } from "/types/comfy";
import type { ComfyExtension } from "@/types/comfy";
import {
type ComfyWorkflowJSON,
parseComfyWorkflow,
} from "../types/comfyWorkflow";
import { ComfyNodeDef } from "/types/apiTypes";
import { ComfyNodeDef } from "@/types/apiTypes";
import { ComfyAppMenu } from "./ui/menu/index";
import { getStorageValue } from "./utils";
import { ComfyWorkflowManager, ComfyWorkflow } from "./workflows";

View File

@@ -1,4 +1,4 @@
import type { ComfyWorkflowJSON } from "/types/comfyWorkflow";
import type { ComfyWorkflowJSON } from "@/types/comfyWorkflow";
export const defaultGraph: ComfyWorkflowJSON = {
last_node_id: 9,

View File

@@ -3,7 +3,7 @@ import { ComfyDialog as _ComfyDialog } from "./ui/dialog";
import { toggleSwitch } from "./ui/toggleSwitch";
import { ComfySettingsDialog } from "./ui/settings";
import { ComfyApp, app } from "./app";
import { TaskItem } from "/types/apiTypes";
import { TaskItem } from "@/types/apiTypes";
export const ComfyDialog = _ComfyDialog;

View File

@@ -3,7 +3,7 @@ import { applyClasses, ClassList, toggleElement } from "../utils";
import { prop } from "../../utils";
import type { ComfyPopup } from "./popup";
import type { ComfyComponent } from ".";
import type { ComfyApp } from "scripts/app";
import type { ComfyApp } from "@/scripts/app";
type ComfyButtonProps = {
icon?: string;

View File

@@ -1,4 +1,4 @@
import type { ComfyApp } from "scripts/app";
import type { ComfyApp } from "@/scripts/app";
import { api } from "../../api";
import { $el } from "../../ui";
import { downloadBlob } from "../../utils";

View File

@@ -4,7 +4,7 @@ import { api } from "../../api";
import { ComfySplitButton } from "../components/splitButton";
import { ComfyQueueOptions } from "./queueOptions";
import { prop } from "../../utils";
import type { ComfyApp } from "scripts/app";
import type { ComfyApp } from "@/scripts/app";
export class ComfyQueueButton {
element = $el("div.comfyui-queue-button");

View File

@@ -1,4 +1,4 @@
import type { ComfyApp } from "scripts/app";
import type { ComfyApp } from "@/scripts/app";
import { $el } from "../../ui";
import { prop } from "../../utils";

View File

@@ -1,4 +1,4 @@
import type { ComfyApp } from "scripts/app";
import type { ComfyApp } from "@/scripts/app";
import { ComfyButton } from "../components/button";
import { ComfyViewList, ComfyViewListButton } from "./viewList";

View File

@@ -2,7 +2,7 @@ import { ComfyButton } from "../components/button";
import { $el } from "../../ui";
import { api } from "../../api";
import { ComfyPopup } from "../components/popup";
import type { ComfyApp } from "scripts/app";
import type { ComfyApp } from "@/scripts/app";
type ViewListMode = "Queue" | "History";

View File

@@ -1,7 +1,7 @@
import { ComfyButton } from "../components/button";
import { ComfyViewList, ComfyViewListButton } from "./viewList";
import { api } from "../../api";
import type { ComfyApp } from "scripts/app";
import type { ComfyApp } from "@/scripts/app";
export class ComfyViewQueueButton extends ComfyViewListButton {
constructor(app: ComfyApp) {

View File

@@ -6,7 +6,7 @@ import { ComfyPopup } from "../components/popup";
import { createSpinner } from "../spinner";
import { ComfyWorkflow, trimJsonExt } from "../../workflows";
import { ComfyAsyncDialog } from "../components/asyncDialog";
import type { ComfyApp } from "scripts/app";
import type { ComfyApp } from "@/scripts/app";
import type { ComfyComponent } from "../components";
export class ComfyWorkflowsMenu {

View File

@@ -2,7 +2,7 @@ import { api } from "./api";
import "./domWidget";
import type { ComfyApp } from "./app";
import type { IWidget, LGraphNode } from "@comfyorg/litegraph";
import { ComfyNodeDef } from "/types/apiTypes";
import { ComfyNodeDef } from "@/types/apiTypes";
export type ComfyWidgetConstructor = (
node: LGraphNode,

View File

@@ -20,7 +20,7 @@
"allowJs": true,
"baseUrl": ".",
"paths": {
"*": ["src/*"],
"@/*": ["src/*"],
},
"typeRoots": ["src/types", "node_modules/@types"],
"outDir": "./dist",