WordPress.org

Make WordPress Core

Changeset 43886


Ignore:
Timestamp:
11/12/2018 04:18:52 AM (13 months ago)
Author:
pento
Message:

Build Tools: Add non-minified @wordpress scripts to the build output.

Props atimmer.
See #45156.

Location:
branches/5.0
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/Gruntfile.js

    r43835 r43886  
    552552        webpack: {
    553553            prod: webpackConfig( { environment: 'production' } ),
     554            devProdTarget: webpackConfig( { environment: 'development', forceBuildTarget: 'build/wp-includes' } ),
    554555            dev: webpackConfig( { environment: 'development' } ),
    555556            watch: webpackConfig( { environment: 'development', watch: true } )
     
    938939        'usebanner',
    939940        'webpack:prod',
    940         'webpack:dev',
     941        'webpack:devProdTarget',
    941942        'jsvalidate:build'
    942943    ] );
  • branches/5.0/tools/webpack/packages.js

    r43884 r43886  
    5050}
    5151
    52 module.exports = function( env = { environment: 'production', watch: false } ) {
     52module.exports = function( env = { environment: 'production', watch: false, forceBuildTarget: false } ) {
    5353    const mode = env.environment;
    5454    const suffix = mode === 'production' ? '.min' : '';
    55     const buildTarget = ( mode === 'production' ? 'build' : 'src' ) + '/wp-includes';
     55    const buildTarget = env.forceBuildTarget ? env.forceBuildTarget : ( mode === 'production' ? 'build' : 'src' ) + '/wp-includes';
    5656
    5757    const packages = [
  • branches/5.0/webpack.config.js

    r43719 r43886  
    22const packagesConfig = require( './tools/webpack/packages' );
    33
    4 module.exports = function( env = { environment: "production", watch: false } ) {
     4module.exports = function( env = { environment: "production", watch: false, forceBuildTarget: false } ) {
    55    if ( ! env.watch ) {
    66        env.watch = false;
     7    }
     8
     9    if ( ! env.forceBuildTarget ) {
     10        env.forceBuildTarget = false;
    711    }
    812
Note: See TracChangeset for help on using the changeset viewer.