Make WordPress Core


Ignore:
Timestamp:
12/14/2018 04:10:26 AM (7 years ago)
Author:
pento
Message:

Build Tools: Copy package JavaScript and CSS into wp-includes.

  • grunt webpack:dev now copies packages JS into /src/wp-includes/js/dist, and CSS into /src/wp-includes/css/dist.
  • grunt webpack:prod does the same, but into /build instead of /src.
  • grunt build now runs the webpack:prod task.

Merges [43760] from the 5.0 branch to trunk.

Props atimmer, pento.
Fixes #45119.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes

    • Property svn:ignore set to
      js
  • trunk/src/wp-includes/css

    • Property svn:ignore set to
      dist

  • trunk/src/wp-includes/script-loader.php

    r44157 r44159  
    9797        }
    9898
    99         $path = "/js/dist/vendor/$handle$dev_suffix.js";
     99        $path = "/wp-includes/js/dist/vendor/$handle$dev_suffix.js";
    100100
    101101        $scripts->add( $handle, $path, $dependencies, false, 1 );
     
    337337
    338338    foreach ( $packages_dependencies as $package => $dependencies ) {
    339         $handle = 'wp-' . $package;
    340         $path   = "/js/dist/$package$suffix.js";
     339        $handle  = 'wp-' . $package;
     340        $path    = "/wp-includes/js/dist/$package$suffix.js";
    341341
    342342        $scripts->add( $handle, $path, $dependencies, false, 1 );
     
    18011801    $styles->add( 'wp-editor-font', $fonts_url );
    18021802
    1803     $styles->add( 'wp-block-library-theme', '/styles/dist/block-library/theme.css' );
     1803    $styles->add( 'wp-block-library-theme', '/wp-includes/css/dist/block-library/theme.css' );
    18041804    $styles->add_data( 'wp-block-library-theme', 'rtl', 'replace' );
    18051805
    18061806    $styles->add(
    18071807        'wp-edit-blocks',
    1808         '/styles/dist/block-library/editor.css',
     1808        '/wp-includes/css/dist/block-library/editor.css',
    18091809        array(
    18101810            'wp-components',
     
    18261826
    18271827    foreach ( $package_styles as $package => $dependencies ) {
    1828         $handle = 'wp-' . $package;
    1829         $path   = '/styles/dist/' . $package . '/style.css';
     1828        $handle  = 'wp-' . $package;
     1829        $path     = '/wp-includes/css/dist/' . $package . '/style.css';
    18301830
    18311831        $styles->add( $handle, $path, $dependencies );
Note: See TracChangeset for help on using the changeset viewer.