Skip to content

ATXP-242: Update templates in create-project.ts#9

Merged
robdimarco-atxp merged 11 commits intomainfrom
robdimarco/atxp-242-update-the-templates-in-the-create-projectts
Sep 10, 2025
Merged

ATXP-242: Update templates in create-project.ts#9
robdimarco-atxp merged 11 commits intomainfrom
robdimarco/atxp-242-update-the-templates-in-the-create-projectts

Conversation

@robdimarco-atxp
Copy link
Contributor

@robdimarco-atxp robdimarco-atxp commented Sep 10, 2025

Summary

Implements ATXP-242 with comprehensive improvements to the create project functionality

Core Features

  • Updated template repository from atxp-express-example to atxp-express-starter
  • Added Framework type for type safety and extensibility
  • Changed createProject to require app name as first parameter (eliminates interactive prompt)
  • Added command line argument support for framework selection (--framework)
  • Added smart git initialization with --git and --no-git flags
  • Fixed help flag handling to show help instead of running commands

Wrapper Package Updates

  • Updated create-atxp wrapper to support new API
  • Fixed argument passing from npm create atxp to underlying atxp create command

Documentation & Developer Experience

  • Updated all README.md files with new command syntax and examples
  • Added comprehensive developer documentation for create-atxp package
  • Created testing instructions and troubleshooting guides

Quality Assurance

  • All TypeScript compilation passes
  • All existing tests pass (8/8)
  • All documented examples tested and verified working
  • Comprehensive linting cleanup completed

Test Plan Completed

  • TypeScript compilation passes (npm run typecheck)
  • All existing tests pass (npm test - 8/8 tests)
  • Linting passes with no warnings (npm run lint)
  • Help flags work correctly (--help, -h)
  • Smart git detection works (tested with/without flags)
  • Framework validation works (rejects invalid frameworks)
  • App name validation works (requires valid names)
  • Both npx atxp create and npm create atxp syntax supported
  • All documented examples tested and verified
  • create-atxp wrapper correctly passes arguments
  • Error messages are clear and actionable

Developer Experience

  • Comprehensive documentation for both users and contributors
  • Testing guides with step-by-step instructions
  • Troubleshooting sections for common issues
  • Clean codebase with no unused imports or warnings
  • Consistent patterns following industry best practices

robdimarco-atxp and others added 11 commits September 10, 2025 16:58
- Create Framework type for type safety and extensibility
- Update TEMPLATES to use atxp-express-starter repository
- Require app name as first parameter to createProject function
- Add command line argument support for framework selection
- Remove interactive project name prompt (now uses parameter)
- Add proper validation for app name and framework parameters
- Update help documentation with new usage examples
- Support both npx atxp create and npm create atxp syntax

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add early help flag detection in parseArgs()
- Handle both --help and -h flags before command processing
- Ensures help is shown when requested with any command

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add git detection utility to check if git is available
- Remove interactive git prompt for better UX
- Default to git initialization when git is detected
- Add --git flag to force git initialization
- Add --no-git flag to skip git initialization
- Display helpful messages about git detection behavior
- Update help documentation with new git options and examples

This follows Rails/CRA patterns of smart defaults with override flags.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace empty object with properly typed createOptions
- Ensures TypeScript interface compliance
- All properties explicitly set to undefined for clarity
- Change from --create flag to 'create' command syntax
- Pass through all arguments to underlying atxp create command
- Update package.json to version 1.1.0 for breaking change
- Update atxp dependency to ^1.1.0
- Maintains full compatibility: npm create atxp my-app --no-git

Now supports:
- npm create atxp my-app
- npm create atxp my-app --framework express
- npm create atxp my-app --no-git
- npm create atxp --help

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Revert version back to 1.0.5 to stay in sync with main package
- Use exact version match for atxp dependency (not ^1.1.0)
- Wrapper packages should maintain version parity with main package
- Update README.md files to reflect required app name parameter
- Add documentation for new --framework, --git, --no-git flags
- Update all examples to show new syntax: npx atxp create <app-name>
- Fix default port number from 8016 to 8017 in demo docs
- Add smart git detection explanation in examples
- Ensure npm create atxp examples match new behavior

All documented examples verified to work with new implementation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create comprehensive README.md for developers working on create-atxp
- Document wrapper architecture and data flow
- Add detailed testing instructions with examples
- Include troubleshooting guide for common issues
- Document version management and publishing workflow
- Add testing checklist for releases
- Explain npm create syntax and how wrapper transforms calls

This helps developers understand and maintain the create-atxp wrapper.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused 'path' import from run-demo.ts
- Remove unused 'inquirer' import from create-project.ts (no longer needed after removing interactive prompts)
- All linting warnings resolved
- Tests and build still pass
## Enhanced Test Coverage

### create-project.test.ts
- Expanded project name validation with more test cases
- Added Framework type validation tests
- Added git options validation tests
- Better organized with nested describe blocks

### index.test.ts
- Enhanced create mode detection tests
- Added comprehensive argument parsing tests
- Added framework flag parsing tests
- Added git flag parsing tests
- Added help flag detection tests

### create-atxp.test.js (NEW)
- New test suite for the wrapper package
- Tests argument transformation logic
- Tests npm create integration flow
- Verifies proper command delegation

## Test Statistics
- Before: 8 tests across 5 files
- After: 17 tests across 6 files
- All tests passing ✅
- Complete coverage of new functionality

## Quality Assurance
- TypeScript compilation ✅
- Linting passes ✅
- Build process ✅
- All new features covered by tests

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@robdimarco-atxp robdimarco-atxp merged commit 57d8854 into main Sep 10, 2025
1 check passed
@robdimarco-atxp robdimarco-atxp deleted the robdimarco/atxp-242-update-the-templates-in-the-create-projectts branch September 10, 2025 21:43
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.

1 participant