Skip to content

Remove dead code from copy.js.#11312

Closed
desrosj wants to merge 1 commit intoWordPress:trunkfrom
desrosj:remove/dead-code-from-copy.js
Closed

Remove dead code from copy.js.#11312
desrosj wants to merge 1 commit intoWordPress:trunkfrom
desrosj:remove/dead-code-from-copy.js

Conversation

@desrosj
Copy link
Member

@desrosj desrosj commented Mar 20, 2026

This removes several groups from COPY_CONFIG that were moved to Grunt tasks for consistency. The copyDirectory() function is also being removed because it's never called.

Trac ticket: Core-64393.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Sonnet 4.6
Used for: Used to analyze the tools/gutenberg directory to find dead code and unused configuration values.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@desrosj desrosj self-assigned this Mar 20, 2026
@github-actions
Copy link

github-actions bot commented Mar 20, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj, peterwilsoncc.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

This removes several groups from `COPY_CONFIG` that were moved to Grunt tasks for consistency. The `copyDirectory()` function is also being removed because it's never called.
@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies the Gutenberg-to-Core copy tooling by removing unused configuration and an unreferenced helper function, aligning remaining asset copying responsibilities with existing Grunt copy tasks (per Core-64393).

Changes:

  • Removes unused COPY_CONFIG groups from tools/gutenberg/copy.js that are now handled by copy:gutenberg-* Grunt tasks.
  • Removes the unused copyDirectory() helper and the last remaining call site.
  • Trims an extraneous whitespace-only line in Gruntfile.js.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
tools/gutenberg/copy.js Removes dead config entries and deletes the unused copyDirectory() implementation + call site.
Gruntfile.js Whitespace-only adjustment in the build task area (no functional change).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@peterwilsoncc
Copy link
Contributor

Testing notes:

  • rm -rf gutenberg .gutenberg-hash; npm ci; npm run grunt clean:qunit; npm run build:dev
  • Opened network tools to disable caching
  • Visited post editor, site editor, fonts library
  • Created a gallery in a post of publicity stills from the hit Broadway musical Dear Evan Hansen (not the movie, ugh)
  • Visited post on front end to ensure the block styles loaded as expected.

@desrosj
Copy link
Member Author

desrosj commented Mar 20, 2026

Merged in r62071.

@desrosj desrosj closed this Mar 20, 2026
@desrosj desrosj deleted the remove/dead-code-from-copy.js branch March 20, 2026 03:16
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.

3 participants