Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1716,21 +1716,21 @@ module.exports = function(grunt) {
grunt.loadNpmTasks( 'grunt-webpack' );

// RTL task.
grunt.registerTask('rtl', ['rtlcss:core', 'rtlcss:colors']);
grunt.registerTask('rtl', 'Generates right-to-left (RTL) stylesheets for core and the admin color schemes.', ['rtlcss:core', 'rtlcss:colors']);

// Color schemes task.
grunt.registerTask('colors', ['sass:colors', 'postcss:colors']);
grunt.registerTask('colors', 'Compiles and processes the admin color scheme stylesheets.', ['sass:colors', 'postcss:colors']);

// JSHint task.
grunt.registerTask( 'jshint:corejs', [
grunt.registerTask( 'jshint:corejs', 'Runs JSHint on the Gruntfile, tests, bundled themes, and core JavaScript files.', [
'jshint:grunt',
'jshint:tests',
'jshint:themes',
'jshint:core',
'jshint:media'
] );

grunt.registerTask( 'restapi-jsclient', [
grunt.registerTask( 'restapi-jsclient', 'Runs the PHPUnit and QUnit tests for the REST API JavaScript client.', [
'phpunit:restapi-jsclient',
'qunit:compiled'
] );
Expand Down Expand Up @@ -1789,7 +1789,7 @@ module.exports = function(grunt) {

grunt.renameTask( 'watch', '_watch' );

grunt.registerTask( 'watch', function() {
grunt.registerTask( 'watch', 'Watches files for changes and runs the related tasks. Use watch:phpunit or --phpunit to also run PHPUnit tests.', function() {
if ( ! this.args.length || this.args.indexOf( 'webpack' ) > -1 ) {
grunt.task.run( 'build' );
}
Expand All @@ -1806,11 +1806,11 @@ module.exports = function(grunt) {

grunt.registerMultiTask( 'imagemin', 'Losslessly optimizes PNG, JPEG and GIF images.', require( './tools/imagemin/task.js' )( grunt ) );

grunt.registerTask( 'precommit:image', [
grunt.registerTask( 'precommit:image', 'Optimizes core images in preparation for a commit.', [
'imagemin:core'
] );

grunt.registerTask( 'precommit:js', [
grunt.registerTask( 'precommit:js', 'Builds, lints, type checks, and tests JavaScript files in preparation for a commit.', [
'webpack:prod',
'jshint:corejs',
'lint:jsdoc',
Expand All @@ -1823,16 +1823,16 @@ module.exports = function(grunt) {
'qunit:compiled'
] );

grunt.registerTask( 'precommit:css', [
grunt.registerTask( 'precommit:css', 'Processes core CSS files with PostCSS in preparation for a commit.', [
'postcss:core'
] );

grunt.registerTask( 'precommit:php', [
grunt.registerTask( 'precommit:php', 'Runs PHPStan and PHPUnit tests in preparation for a commit.', [
'phpstan',
'phpunit'
] );

grunt.registerTask( 'precommit:emoji', [
grunt.registerTask( 'precommit:emoji', 'Updates the emoji regular expressions from the latest Twemoji file list. Requires the GitHub CLI.', [
'replace:emoji-regex'
] );

Expand Down Expand Up @@ -1972,14 +1972,14 @@ module.exports = function(grunt) {
}
} );

grunt.registerTask( 'copy:js', [
grunt.registerTask( 'copy:js', 'Copies JavaScript files from npm packages, vendor libraries, wp-admin, and wp-includes.', [
'copy:npm-packages',
'copy:vendor-js',
'copy:admin-js',
'copy:includes-js'
] );

grunt.registerTask( 'uglify:all', [
grunt.registerTask( 'uglify:all', 'Minifies all JavaScript files.', [
'uglify:core',
'uglify:emoji-loader',
'uglify:jquery-ui',
Expand All @@ -1990,20 +1990,20 @@ module.exports = function(grunt) {
'uglify:wp-polyfill-fetch'
] );

grunt.registerTask( 'build:codemirror', [
grunt.registerTask( 'build:codemirror', 'Builds the CodeMirror script and styles.', [
'webpack:codemirror',
'cssmin:codemirror',
'usebanner:codemirror',
'copy:codemirror'
] );

grunt.registerTask( 'build:webpack', [
grunt.registerTask( 'build:webpack', 'Cleans the webpack assets and runs the production and development webpack builds.', [
'clean:webpack-assets',
'webpack:prod',
'webpack:dev',
] );

grunt.registerTask( 'build:js', [
grunt.registerTask( 'build:js', 'Builds all JavaScript files.', [
'clean:js',
'build:webpack',
'copy:js',
Expand All @@ -2013,7 +2013,7 @@ module.exports = function(grunt) {
'concat:emoji'
] );

grunt.registerTask( 'build:css', [
grunt.registerTask( 'build:css', 'Builds all CSS files, including the RTL and admin color scheme stylesheets.', [
'clean:css',
'copy:wp-admin-css-compat-rtl',
'copy:wp-admin-css-compat-min',
Expand Down Expand Up @@ -2104,38 +2104,38 @@ module.exports = function(grunt) {
} );
} );

grunt.registerTask( 'build:certificates', [
grunt.registerTask( 'build:certificates', 'Copies the certificate authority bundle into wp-includes.', [
'copy:certificates'
] );

grunt.registerTask( 'certificates:upgrade', [
grunt.registerTask( 'certificates:upgrade', 'Upgrades the certificate authority bundle package and copies the bundle into wp-includes.', [
'certificates:upgrade-package',
'copy:certificates'
] );

grunt.registerTask( 'build:files', [
grunt.registerTask( 'build:files', 'Cleans the build directory and copies the core files into it.', [
'clean:files',
'copy:files',
'copy:version',
] );

grunt.registerTask( 'replace:workflow-references-local-to-remote', [
grunt.registerTask( 'replace:workflow-references-local-to-remote', 'Replaces local reusable workflow references with references to trunk.', [
'copy:workflow-references-local-to-remote',
]);

grunt.registerTask( 'replace:workflow-references-remote-to-local', [
grunt.registerTask( 'replace:workflow-references-remote-to-local', 'Replaces reusable workflow references to trunk with local references.', [
'copy:workflow-references-remote-to-local',
]);

grunt.registerTask( 'post-branching', [
grunt.registerTask( 'post-branching', 'Removes unneeded workflows and points reusable workflow references to trunk after branching.', [
'clean:workflows',
'replace:workflow-references-local-to-remote'
]);

/**
* Build verification tasks.
*/
grunt.registerTask( 'verify:build', [
grunt.registerTask( 'verify:build', 'Runs all build verification tasks.', [
'verify:old-files',
'verify:source-maps',
] );
Expand All @@ -2145,7 +2145,7 @@ module.exports = function(grunt) {
*
* @ticket 36083
*/
grunt.registerTask( 'verify:old-files', function() {
grunt.registerTask( 'verify:old-files', 'Verifies that no files listed in $_old_files exist in the build directory.', function() {
const file = `${ BUILD_DIR }wp-admin/includes/update-core.php`;

assert(
Expand Down Expand Up @@ -2205,7 +2205,7 @@ module.exports = function(grunt) {
* @ticket 46218
* @ticket 60348
*/
grunt.registerTask( 'verify:source-maps', function() {
grunt.registerTask( 'verify:source-maps', 'Verifies that built JavaScript files do not contain source map links.', function() {
const ignoredFiles = [
'build/wp-includes/js/dist/components.js',
'build/wp-includes/js/dist/data.js',
Expand Down Expand Up @@ -2291,7 +2291,7 @@ module.exports = function(grunt) {
} );

// Detects and copies stable routes.
grunt.registerTask( 'build:routes', [
grunt.registerTask( 'build:routes', 'Detects and copies the stable Gutenberg routes.', [
'routes:setup',
'copy:routes',
] );
Expand All @@ -2303,7 +2303,7 @@ module.exports = function(grunt) {
*
* Because all of these tasks write to src/, the outcome is identical for build and build:dev.
*/
grunt.registerTask( 'build:gutenberg', [
grunt.registerTask( 'build:gutenberg', 'Refreshes the Gutenberg-sourced content in src/.', [
'clean:gutenberg',
'copy:gutenberg-php',
'build:routes',
Expand All @@ -2316,7 +2316,7 @@ module.exports = function(grunt) {
'copy:icon-library-manifest',
] );

grunt.registerTask( 'build', function() {
grunt.registerTask( 'build', 'Builds WordPress. Use --dev to build into src/ for development.', function() {
if ( grunt.option( 'dev' ) ) {
grunt.task.run( [
'gutenberg:verify',
Expand All @@ -2341,7 +2341,7 @@ module.exports = function(grunt) {
}
} );

grunt.registerTask( 'prerelease', [
grunt.registerTask( 'prerelease', 'Runs formatting checks, linting, tests, and image optimization in preparation for a release.', [
'format:php:error',
'precommit:php',
'precommit:js',
Expand Down Expand Up @@ -2482,7 +2482,7 @@ module.exports = function(grunt) {
grunt.registerTask('apply', 'patch');

// Default task.
grunt.registerTask('default', ['build']);
grunt.registerTask('default', 'Runs the build task.', ['build']);

/*
* Automatically updates the `:dynamic` configurations
Expand Down
Loading