mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-22 07:19:41 +00:00
Update remaining @comfyorg/litegraph references
This commit is contained in:
@@ -151,10 +151,10 @@ widget.onPointerDown = function (pointer, node, canvas) {
|
||||
|
||||
### TypeScript & JSDoc
|
||||
|
||||
In-IDE typing is available for use in at least mainstream editors. It can be added to JS projects using the @comfyorg/litegraph npm package.
|
||||
In-IDE typing is available for use in at least mainstream editors. TypeScript definitions are available in the litegraph library.
|
||||
|
||||
```ts
|
||||
/** @import { IWidget } from './path/to/@comfyorg/litegraph/litegraph.d.ts' */
|
||||
/** @import { IWidget } from './path/to/litegraph/litegraph.d.ts' */
|
||||
/** @type IWidget */
|
||||
const widget = node.widgets[0]
|
||||
widget.onPointerDown = function (pointer, node, canvas) {}
|
||||
|
||||
@@ -16,9 +16,9 @@ Some early highlights:
|
||||
- Batch output connection move/disconnect (<https://github.com/Comfy-Org/litegraph.js/pull/39>)
|
||||
- And now with hundreds more...
|
||||
|
||||
# Install
|
||||
# Usage
|
||||
|
||||
`npm i @comfyorg/litegraph`
|
||||
This library is included as a git subtree in the ComfyUI frontend project at `src/lib/litegraph`.
|
||||
|
||||
# litegraph.js
|
||||
|
||||
@@ -48,12 +48,12 @@ It can be integrated easily in any existing web applications and graphs can be r
|
||||
- Easy to integrate in any JS application (one single file, no dependencies)
|
||||
- Typescript support
|
||||
|
||||
## Installation
|
||||
## Integration
|
||||
|
||||
You can install it using npm
|
||||
This library is integrated as a git subtree in the ComfyUI frontend project. To use it in your code:
|
||||
|
||||
```bash
|
||||
npm install @comfyorg/litegraph
|
||||
```typescript
|
||||
import { LGraph, LGraphNode, LiteGraph } from '@/lib/litegraph'
|
||||
```
|
||||
|
||||
## How to code a new Node type
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import '@/lib/litegraph/src/style.css'
|
||||
import { definePreset } from '@primevue/themes'
|
||||
import Aura from '@primevue/themes/aura'
|
||||
import * as Sentry from '@sentry/vue'
|
||||
@@ -14,6 +13,7 @@ import { VueFire, VueFireAuth } from 'vuefire'
|
||||
|
||||
import '@/assets/css/style.css'
|
||||
import { FIREBASE_CONFIG } from '@/config/firebase'
|
||||
import '@/lib/litegraph/src/style.css'
|
||||
import router from '@/router'
|
||||
|
||||
import App from './App.vue'
|
||||
|
||||
Reference in New Issue
Block a user