Skip to content

Conversation

@emmadesilva
Copy link
Member

@emmadesilva emmadesilva commented Jun 12, 2024

Fixes #1715 and opens up for more formats in the future, trying to match how Symfony does it.

Currently only the json format is added.

[
    {
        "page_type": "BladePage",
        "source_file": "_pages/404.blade.php",
        "output_file": "_site/404.html",
        "route_key": "404"
    },
    {
        "page_type": "BladePage",
        "source_file": "_pages/index.blade.php",
        "output_file": "_site/index.html",
        "route_key": "index"
    }
]

Of course, the output of this can also be redirected into a file stream:

$ php hyde route:list --format=json > routes.json

@emmadesilva emmadesilva linked an issue Jun 12, 2024 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.97%. Comparing base (9bf132f) to head (26fa836).
Report is 1 commits behind head on master.

Current head 26fa836 differs from pull request most recent head 5e4caf0

Please upload reports for the commit 5e4caf0 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1724   +/-   ##
=========================================
  Coverage     99.97%   99.97%           
- Complexity     1745     1748    +3     
=========================================
  Files           181      181           
  Lines          4661     4669    +8     
=========================================
+ Hits           4660     4668    +8     
  Misses            1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@emmadesilva emmadesilva changed the title Support route list command formats Support route list command formats and add JSON output Jun 12, 2024
@emmadesilva emmadesilva marked this pull request as ready for review June 12, 2024 14:30
@emmadesilva emmadesilva changed the title Support route list command formats and add JSON output Add a JSON output format option to the route list command Jun 12, 2024
@emmadesilva emmadesilva merged commit bb34282 into master Jun 12, 2024
@emmadesilva emmadesilva deleted the route-list-formats branch June 12, 2024 14:40
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.

Add route list flag to return JSON

2 participants