Make WordPress Core


Ignore:
Timestamp:
01/05/2026 10:49:26 AM (2 months ago)
Author:
youknowriad
Message:

Build: Update Gutenberg integration to checkout-and-build approach.

This changes WordPress Core's Gutenberg integration from npm packages to checking out and building Gutenberg directly. Instead of syncing individual npm packages, Core now checks out the Gutenberg repository, builds it, and copies the build artifacts.

This enables Core to use Gutenberg's advanced features like route-based navigation, full-page rendering, and the Font Library, while also streamlining future updates.

New commands:

  • npm run gutenberg:checkout - Clones Gutenberg at a specified ref
  • npm run gutenberg:build - Runs Gutenberg's build process
  • npm run gutenberg:copy - Copies and transforms build output to Core
  • npm run gutenberg:integrate - Runs all three steps

Main changes:

  • Removes webpack configs replaced by Gutenberg's build (blocks.js, packages.js, script-modules.js, development.js, vendors.js)
  • Adds Font Library page (/wp-admin/font-library.php)
  • Adds copy scripts to transform Gutenberg plugin paths to Core paths
  • Moves vendor copy step from webpack to Gruntfile

New year, new process. Happy New Year!

Props youknowriad, ellatrix, sirreal, westonruter, desrosj, tellthemachines.
Fixes #64393.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/test-build-processes.yml

    r61209 r61438  
    3333      - '.github/workflows/test-build-processes.yml'
    3434      - '.github/workflows/reusable-test-core-build-process.yml'
    35       - '.github/workflows/reusable-test-gutenberg-build-process.yml'
    3635  workflow_dispatch:
    3736
     
    9998      directory: ${{ matrix.directory }}
    10099
    101   # Tests the Gutenberg plugin build process within a wordpress-develop checkout.
    102   test-gutenberg-build-process:
    103     name: Gutenberg running from ${{ matrix.directory }}
    104     uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
    105     permissions:
    106       contents: read
    107     if: ${{ github.repository == 'WordPress/wordpress-develop' }}
    108     strategy:
    109       fail-fast: false
    110       matrix:
    111         os: [ 'ubuntu-24.04' ]
    112         directory: [ 'src', 'build' ]
    113     with:
    114       os: ${{ matrix.os }}
    115       directory: ${{ matrix.directory }}
    116 
    117   # Tests the Gutenberg plugin build process on additional operating systems.
    118   #
    119   # This is separate from the job above in order to use stricter conditions when determining when to test additional
    120   # operating systems. This avoids unintentionally consuming excessive minutes. Windows-based jobs consume minutes at a
    121   # 2x rate, and MacOS-based jobs at a 10x rate.
    122   # See https://docs.github.com/en/billing/concepts/product-billing/github-actions#per-minute-rates.
    123   #
    124   # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
    125   # currently no way to determine the OS being used on a given job.
    126   # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
    127   test-gutenberg-build-process-additional-os:
    128     name: Gutenberg running from ${{ matrix.directory }}
    129     uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
    130     permissions:
    131       contents: read
    132     if: ${{ github.repository == 'WordPress/wordpress-develop' }}
    133     strategy:
    134       fail-fast: false
    135       matrix:
    136         os: [ 'macos-15', 'windows-2025' ]
    137         directory: [ 'src', 'build' ]
    138     with:
    139       os: ${{ matrix.os }}
    140       directory: ${{ matrix.directory }}
    141 
    142100  slack-notifications:
    143101    name: Slack Notifications
     
    146104      actions: read
    147105      contents: read
    148     needs: [ test-core-build-process, test-core-build-process-additional-os, test-gutenberg-build-process, test-gutenberg-build-process-additional-os ]
     106    needs: [ test-core-build-process, test-core-build-process-additional-os ]
    149107    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
    150108    with:
Note: See TracChangeset for help on using the changeset viewer.