Making WordPress.org


Ignore:
Timestamp:
06/25/2020 03:50:47 AM (4 years ago)
Author:
tellyworth
Message:

Plugin dir: improve detection of block assets during import.

This skips webpack.config.js if present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php

    r9938 r9982  
    527527                    if ( empty( preg_grep( '!\.(?:js|jsx)$!i', $build_files ) ) ) {
    528528                        // Finally, just grab whatever js/css files there are in the current directory.
    529                         $build_files += Filesystem::list_files( "$base_dir/$block_dir", false, '!\.(?:js|jsx|css)$!i' );
     529                        $build_files += Filesystem::list_files( "$base_dir/$block_dir", false, '#(?<!webpack\.config)\.(?:js|jsx|css)$#i' );
    530530                    }
    531531                }
Note: See TracChangeset for help on using the changeset viewer.