Skip to content

V2.0.0

Choose a tag to compare

@miftah704 miftah704 released this 08 Dec 10:14
· 14 commits to main since this release
2a2ee9f

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

  1. Command Options for make:model and make: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.
  2. Unified and Enhanced Command Listing (list):

    • Improved the list command to display all commands in a single table, categorized with proper spacing.
    • Added options for make:model and make:controller to the command list description for better user understanding.
  3. Dynamic Folder and Path Handling:

    • Adjusted make:model and make:controller to create files within nested paths based on user input (e.g., v1/User generates files in models/v1 and controllers/v1).
  4. Improved Documentation:

    • Enhanced README with:
      • Detailed descriptions for new features.
      • Instructions on using options like --controller and --all.
      • Screenshots showcasing commands with options.
    • Updated the command table to include all commands and their descriptions.

Fixes

  • Fixed issues with command options where generated files didn't align with the nested path structure.
  • Resolved inconsistencies in table width for the list command to ensure full descriptions are displayed.

Improvements

  1. Command Output:
    • Enhanced the user feedback with clearer summaries and options descriptions after executing commands.
  2. Codebase Refactoring:
    • Organized utility functions and shared logic for reuse across commands, improving maintainability.
  3. Compatibility Fixes:
    • Ensured compatibility with the latest Node.js versions.

How to Test

  1. Pull the dev branch and run npm install.
  2. Test the following commands:
    • node artisan make:model User -c
    • node artisan make:model v1/User -a
    • node artisan make:controller v1/User -s
  3. Check the list command:
    • Run node artisan list and verify that the table displays all commands and their options clearly.

Screenshots

  • Added screenshots to README showcasing the new options and enhanced CLI behavior.