- Migrate 7 JavaScript files to TypeScript with full type annotations - Add TypeScript infrastructure: tsconfig.json, package.json, vitest.config.ts - Add type declarations for ComfyUI and LiteGraph APIs (web/types/) - Add comprehensive test suite with Vitest: - noise_visualizer.test.ts (29 tests) - Canvas rendering methods - matrix_button.test.ts (19 tests) - Window utilities - integration.test.ts (16 tests) - Extension registration - shader_rendering.test.ts (21 tests) - WebGL pipeline - Add test mocks for Canvas 2D, WebGL, and ComfyUI APIs - Update .gitignore to track TypeScript sources Files migrated: - gradient_title.ts (245 lines) - shader_params_save_button.ts (540 lines) - noise_visualizer.ts (1,578 lines) - advanced_comparer.ts (905 lines, optimized from 1,772) - shader_renderer.ts (615 lines, optimized from 2,396) - video_comparer.ts (1,179 lines, optimized from 2,402) - matrix_button.ts (3,360 lines, fully typed)
25 lines
714 B
JSON
25 lines
714 B
JSON
{
|
|
"name": "comfyui-shadernoiseksampler-web",
|
|
"version": "1.0.0",
|
|
"type": "module",
|
|
"description": "TypeScript frontend for ComfyUI ShaderNoiseKSampler custom nodes",
|
|
"scripts": {
|
|
"build": "tsc && cp dist/src/*.js web/",
|
|
"watch": "tsc --watch",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"typecheck": "tsc --noEmit",
|
|
"clean": "rm -rf dist/"
|
|
},
|
|
"devDependencies": {
|
|
"typescript": "^5.3.3",
|
|
"vitest": "^1.2.2",
|
|
"@vitest/coverage-v8": "^1.2.2",
|
|
"jsdom": "^24.0.0",
|
|
"@types/node": "^20.11.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
}
|
|
} |