Skip to content

Commit

Permalink
Merge branch 'WordPress:trunk' into 50442
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson authored Feb 11, 2025
2 parents 9a52a18 + 64fd288 commit 36c62ce
Show file tree
Hide file tree
Showing 170 changed files with 6,218 additions and 5,192 deletions.
48 changes: 45 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,46 @@ module.exports = function(grunt) {
// First do `npm install` if package.json has changed.
installChanged.watchPackage();

// Load tasks.
require('matchdep').filterDev(['grunt-*', '!grunt-legacy-util']).forEach( grunt.loadNpmTasks );

// Load legacy utils.
grunt.util = require('grunt-legacy-util');

var gruntDependencies = {
'contrib': [
'clean',
'concat',
'copy',
'cssmin',
'jshint',
'qunit',
'uglify',
'watch'
],
'standard': [
'banner',
'file-append',
'jsdoc',
'patch-wordpress',
'replace-lts',
'rtlcss',
'sass',
'webpack'
]
};

// Load grunt-* tasks.
function loadGruntTasks( dependency ) {
var contrib = key === 'contrib' ? 'contrib-' : '';
grunt.loadNpmTasks( 'grunt-' + contrib + dependency );
}

for ( var key in gruntDependencies ) {
if ( ! gruntDependencies.hasOwnProperty( key ) ) {
continue;
}

gruntDependencies[key].forEach( loadGruntTasks );
}

// Load PostCSS tasks.
grunt.loadNpmTasks('@lodder/grunt-postcss');

Expand Down Expand Up @@ -774,7 +808,14 @@ module.exports = function(grunt) {
},
uglify: {
options: {
parse: {
module: false
},
compress: {
module: false
},
output: {
module: false,
ascii_only: true
}
},
Expand Down Expand Up @@ -1663,6 +1704,7 @@ module.exports = function(grunt) {
grunt.registerTask( 'verify:source-maps', function() {
const ignoredFiles = [
'build/wp-includes/js/dist/components.js',
'build/wp-includes/js/dist/data.js',
];
const files = buildFiles.reduce( ( acc, path ) => {
// Skip excluded paths and any path that isn't a file.
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"issues": "https://core.trac.wordpress.org/"
},
"require": {
"ext-hash": "*",
"ext-json": "*",
"php": ">=7.2.24"
},
Expand Down
Loading

0 comments on commit 36c62ce

Please sign in to comment.