Skip to content

v1.4.0 - Extended Component Template Options

Choose a tag to compare

@snowden-fu snowden-fu released this 22 Jun 04:01
· 33 commits to main since this release

πŸš€ Extended Component Template Options - Phase 1

This release introduces 5 different component type templates to make React component creation more flexible and powerful.

✨ New Features

Component Type Templates

  • Functional Component - Traditional function declaration
  • Arrow Function Component - Modern arrow function syntax
  • Class Component - ES6 class with constructor and render method
  • Memoized Component - Wrapped with React.memo for performance optimization
  • ForwardRef Component - Wrapped with React.forwardRef for ref forwarding

Enhanced Features

  • Automatic Import Management - React hooks (memo, forwardRef) are imported automatically
  • Full TypeScript Support - All templates work with both JavaScript and TypeScript
  • Interactive CLI Selection - Choose component type during creation process
  • Comprehensive Testing - Full test suite for all component types

πŸ› Bug Fixes

  • Style File Naming - Fixed double dots in CSS/SCSS file names
    • Before: ComponentName.module..css
    • After: ComponentName.module.css

πŸ“š Documentation

  • Updated README with component type examples
  • Added comprehensive test files
  • Created example files for each component type

πŸ”§ Technical Improvements

  • Enhanced ComponentFileContent class with template-specific methods
  • Improved CLI interface with component type selection
  • Better error handling and user feedback

Breaking Changes: None - This is a backward-compatible enhancement.

Migration: No migration required. Existing functionality remains unchanged.