Skip to content

Simply Commands#32

Open
nickmoreton wants to merge 3 commits intomainfrom
simply-commands
Open

Simply Commands#32
nickmoreton wants to merge 3 commits intomainfrom
simply-commands

Conversation

@nickmoreton
Copy link
Copy Markdown
Contributor

@nickmoreton nickmoreton commented May 21, 2025

This pull request introduces a significant refactor of the Wagtail-WordPress Connector's development environment setup and command-line tools. The changes include replacing the previous rich_click-based CLI commands with a Makefile for managing WordPress, Wagtail, and Django tasks, as well as restructuring and improving the anchor link inspection functionality. Below is a summary of the most important changes:

Migration to Makefile for Command Management

  • Added a comprehensive Makefile to replace the previous CLI commands. It includes commands for managing WordPress containers, running Wagtail/Django tasks, importing WordPress data, and handling Node.js frontend assets. This simplifies the development workflow by consolidating all commands into a single file.

Removal of Old CLI Commands

  • Removed the commands/cli.py file, which previously defined CLI commands for managing WordPress, Wagtail, and Django environments. The functionality has been replaced by the Makefile.
  • Removed the commands/anchor_links.py and commands/inspector.py files, which provided CLI commands for inspecting WordPress API endpoints and anchor links. These functionalities have been restructured and moved to standalone scripts. [1] [2]

Refactor of Anchor Link Inspection

  • Added a new commands/find_anchor_links.py script to replace the old anchor_links.py functionality. The script now uses argparse for argument parsing and includes improved error handling, colored output with colorama, and a more modular design.
  • Introduced a commands/helpers.py file to centralize shared constants (e.g., BASE_ENDPOINT, ENDPOINTS) and helper functions (e.g., display_colored_text, show_endpoints) for better maintainability and reusability.

@nickmoreton nickmoreton changed the title Remove click cli.py and replace with Makefile Simply Commands May 21, 2025
@nickmoreton nickmoreton marked this pull request as ready for review May 21, 2025 21:18
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