Chenlei Hu f85cb3d5e9 Migrate all tests to TypeScript (#19)
* Merge 2 npm repos

* Install ts-jest

* Update jestconfig

* Fix jest types

* jest fix

* Fix babel config ref issue

* Fix import

* Fix import meta issue

* fix generate

* Skip multi-user tests
2024-06-17 11:25:56 -04:00
2024-06-13 20:31:54 -04:00
2024-06-17 11:25:56 -04:00
2024-06-14 17:11:19 -04:00
2024-06-12 20:22:24 -04:00
2024-06-17 09:34:06 -04:00

ComfyUI_frontend

Front end of ComfyUI modernized.

The grand migration to TypeScript

This repo is an experiment trying to migrate ComfyUI's front-end code to TypeScript for a better front-end development experience.

Tasks

  • Gradually migrate the code to TypeScript in this repo, while monitoring the change in ComfyUI's front-end code.

  • Using zod schema to add static/runtime type check for core structures.

  • Figure out a way to reliably embed compiled code to ComfyUI distribution.

    • It can be a bot regularly pulling the new changes in the front-end repo and submitting them to the main repo. (Chrome does a similar process for Chrome devtools, which is hosted in a separate repo.)

Development

Currently the dev server does not work as the ws runs on root path '/', and all api endpoints are all defined on '/'. There might need to be some API changes before dev server can work.

  • Run npm install to install the necessary packages
  • Start local ComfyUI backend at localhost:8188
  • Run npm run dev to start the dev server

Test

  • npm run build to build the front end
  • cd tests-ui
  • npm i to install all test dependencies
  • npm run test:generate to fetch data/object_info.json
  • npm run test to execute all unit tests.
Description
Official front-end implementation of ComfyUI
Readme GPL-3.0 672 MiB
Languages
TypeScript 80.2%
Vue 18.2%
CSS 0.7%
Python 0.3%
Shell 0.3%
Other 0.2%