Skip to content

Identify refactoring opportunities in codebase#17

Merged
hashrock merged 1 commit into
mainfrom
claude/identify-refactoring-points-ICwDB
Jan 5, 2026
Merged

Identify refactoring opportunities in codebase#17
hashrock merged 1 commit into
mainfrom
claude/identify-refactoring-points-ICwDB

Conversation

@hashrock

@hashrock hashrock commented Jan 5, 2026

Copy link
Copy Markdown
Owner
  • Create src/utils.js with shared utilities (flattenChildren, cleanupTempFile, getFilesRecursively, isJSXFile, isHTMLFile, toCamelCase, debounce)
  • Create src/constants.js with centralized configuration (PORTS, DIRS, TIMING, SELF_CLOSING_TAGS, MIME_TYPES, HTTP_STATUS, INLINE_JSX_RUNTIME)
  • Split cli.js (262 lines) into modular commands:
    • commands/build.js - build command logic
    • commands/dev.js - dev server command logic
    • cli.js (78 lines) - entry point only
  • Update all files to use shared utilities and constants
  • Add JSDoc type annotations to exported functions
  • Remove duplicate code across barrels.js, builder.js, jsx-runtime.js
  • Net reduction: 262 lines of code

- Create src/utils.js with shared utilities (flattenChildren, cleanupTempFile,
  getFilesRecursively, isJSXFile, isHTMLFile, toCamelCase, debounce)
- Create src/constants.js with centralized configuration (PORTS, DIRS, TIMING,
  SELF_CLOSING_TAGS, MIME_TYPES, HTTP_STATUS, INLINE_JSX_RUNTIME)
- Split cli.js (262 lines) into modular commands:
  - commands/build.js - build command logic
  - commands/dev.js - dev server command logic
  - cli.js (78 lines) - entry point only
- Update all files to use shared utilities and constants
- Add JSDoc type annotations to exported functions
- Remove duplicate code across barrels.js, builder.js, jsx-runtime.js
- Net reduction: 262 lines of code
@hashrock
hashrock merged commit 7d729be into main Jan 5, 2026
5 checks passed
@hashrock
hashrock deleted the claude/identify-refactoring-points-ICwDB branch January 5, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants