Repository navigation
V2.0.0
Pull Request Description
Enhance Node Artisan CLI with New Features and Fixes
Summary
This pull request introduces significant enhancements and fixes to the Node Artisan CLI, improving functionality, usability, and documentation. Below is a summary of the key changes made:
Features Added
-
Command Options for
make:modelandmake:controller:- Added options for
make:model:--controller(-c): Automatically generate a controller for the model.--all(-a): Automatically generate a controller, service, and repository for the model.
- Added options for
make:controller:--service(-s): Automatically generate a service for the controller.--repository(-r): Automatically generate a repository for the controller.--all(-a): Generate both service and repository.
- Added options for
-
Unified and Enhanced Command Listing (
list):- Improved the
listcommand to display all commands in a single table, categorized with proper spacing. - Added options for
make:modelandmake:controllerto the command list description for better user understanding.
- Improved the
-
Dynamic Folder and Path Handling:
- Adjusted
make:modelandmake:controllerto create files within nested paths based on user input (e.g.,v1/Usergenerates files inmodels/v1andcontrollers/v1).
- Adjusted
-
Improved Documentation:
- Enhanced README with:
- Detailed descriptions for new features.
- Instructions on using options like
--controllerand--all. - Screenshots showcasing commands with options.
- Updated the command table to include all commands and their descriptions.
- Enhanced README with:
Fixes
- Fixed issues with command options where generated files didn't align with the nested path structure.
- Resolved inconsistencies in table width for the
listcommand to ensure full descriptions are displayed.
Improvements
- Command Output:
- Enhanced the user feedback with clearer summaries and options descriptions after executing commands.
- Codebase Refactoring:
- Organized utility functions and shared logic for reuse across commands, improving maintainability.
- Compatibility Fixes:
- Ensured compatibility with the latest Node.js versions.
How to Test
- Pull the
devbranch and runnpm install. - Test the following commands:
node artisan make:model User -cnode artisan make:model v1/User -anode artisan make:controller v1/User -s
- Check the
listcommand:- Run
node artisan listand verify that the table displays all commands and their options clearly.
- Run
Screenshots
- Added screenshots to README showcasing the new options and enhanced CLI behavior.