WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/19/2018 06:05:13 AM (12 months 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.

Props atimmer, pento.
Fixes #45119.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/script-loader.php

    r43753 r43760  
    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 );
     
    338338    foreach ( $packages_dependencies as $package => $dependencies ) {
    339339        $handle  = 'wp-' . $package;
    340         $path    = "/js/dist/$package$suffix.js";
     340        $path    = "/wp-includes/js/dist/$package$suffix.js";
    341341
    342342        $scripts->add( $handle, $path, $dependencies, false, 1 );
     
    16081608    $styles->add( 'wp-editor-font', $fonts_url );
    16091609
    1610     $styles->add( 'wp-block-library-theme', '/styles/dist/block-library/theme.css' );
     1610    $styles->add( 'wp-block-library-theme', '/wp-includes/css/dist/block-library/theme.css' );
    16111611    $styles->add_data( 'wp-block-library-theme', 'rtl', 'replace' );
    16121612
    16131613    $styles->add(
    16141614        'wp-edit-blocks',
    1615         '/styles/dist/block-library/editor.css',
     1615        '/wp-includes/css/dist/block-library/editor.css',
    16161616        array(
    16171617            'wp-components',
     
    16341634    foreach ( $package_styles as $package => $dependencies ) {
    16351635        $handle  = 'wp-' . $package;
    1636         $path     = '/styles/dist/' . $package . '/style.css';
     1636        $path     = '/wp-includes/css/dist/' . $package . '/style.css';
    16371637
    16381638        $styles->add( $handle, $path, $dependencies );
Note: See TracChangeset for help on using the changeset viewer.