@@ -1716,21 +1716,21 @@ module.exports = function(grunt) {
17161716 grunt . loadNpmTasks ( 'grunt-webpack' ) ;
17171717
17181718 // RTL task.
1719- grunt . registerTask ( 'rtl' , [ 'rtlcss:core' , 'rtlcss:colors' ] ) ;
1719+ grunt . registerTask ( 'rtl' , 'Generates right-to-left (RTL) stylesheets for core and the admin color schemes.' , [ 'rtlcss:core' , 'rtlcss:colors' ] ) ;
17201720
17211721 // Color schemes task.
1722- grunt . registerTask ( 'colors' , [ 'sass:colors' , 'postcss:colors' ] ) ;
1722+ grunt . registerTask ( 'colors' , 'Compiles and processes the admin color scheme stylesheets.' , [ 'sass:colors' , 'postcss:colors' ] ) ;
17231723
17241724 // JSHint task.
1725- grunt . registerTask ( 'jshint:corejs' , [
1725+ grunt . registerTask ( 'jshint:corejs' , 'Runs JSHint on the Gruntfile, tests, bundled themes, and core JavaScript files.' , [
17261726 'jshint:grunt' ,
17271727 'jshint:tests' ,
17281728 'jshint:themes' ,
17291729 'jshint:core' ,
17301730 'jshint:media'
17311731 ] ) ;
17321732
1733- grunt . registerTask ( 'restapi-jsclient' , [
1733+ grunt . registerTask ( 'restapi-jsclient' , 'Runs the PHPUnit and QUnit tests for the REST API JavaScript client.' , [
17341734 'phpunit:restapi-jsclient' ,
17351735 'qunit:compiled'
17361736 ] ) ;
@@ -1789,7 +1789,7 @@ module.exports = function(grunt) {
17891789
17901790 grunt . renameTask ( 'watch' , '_watch' ) ;
17911791
1792- grunt . registerTask ( 'watch' , function ( ) {
1792+ grunt . registerTask ( 'watch' , 'Watches files for changes and runs the related tasks. Use watch:phpunit or --phpunit to also run PHPUnit tests.' , function ( ) {
17931793 if ( ! this . args . length || this . args . indexOf ( 'webpack' ) > - 1 ) {
17941794 grunt . task . run ( 'build' ) ;
17951795 }
@@ -1806,11 +1806,11 @@ module.exports = function(grunt) {
18061806
18071807 grunt . registerMultiTask ( 'imagemin' , 'Losslessly optimizes PNG, JPEG and GIF images.' , require ( './tools/imagemin/task.js' ) ( grunt ) ) ;
18081808
1809- grunt . registerTask ( 'precommit:image' , [
1809+ grunt . registerTask ( 'precommit:image' , 'Optimizes core images in preparation for a commit.' , [
18101810 'imagemin:core'
18111811 ] ) ;
18121812
1813- grunt . registerTask ( 'precommit:js' , [
1813+ grunt . registerTask ( 'precommit:js' , 'Builds, lints, type checks, and tests JavaScript files in preparation for a commit.' , [
18141814 'webpack:prod' ,
18151815 'jshint:corejs' ,
18161816 'lint:jsdoc' ,
@@ -1823,16 +1823,16 @@ module.exports = function(grunt) {
18231823 'qunit:compiled'
18241824 ] ) ;
18251825
1826- grunt . registerTask ( 'precommit:css' , [
1826+ grunt . registerTask ( 'precommit:css' , 'Processes core CSS files with PostCSS in preparation for a commit.' , [
18271827 'postcss:core'
18281828 ] ) ;
18291829
1830- grunt . registerTask ( 'precommit:php' , [
1830+ grunt . registerTask ( 'precommit:php' , 'Runs PHPStan and PHPUnit tests in preparation for a commit.' , [
18311831 'phpstan' ,
18321832 'phpunit'
18331833 ] ) ;
18341834
1835- grunt . registerTask ( 'precommit:emoji' , [
1835+ grunt . registerTask ( 'precommit:emoji' , 'Updates the emoji regular expressions from the latest Twemoji file list. Requires the GitHub CLI.' , [
18361836 'replace:emoji-regex'
18371837 ] ) ;
18381838
@@ -1972,14 +1972,14 @@ module.exports = function(grunt) {
19721972 }
19731973 } ) ;
19741974
1975- grunt . registerTask ( 'copy:js' , [
1975+ grunt . registerTask ( 'copy:js' , 'Copies JavaScript files from npm packages, vendor libraries, wp-admin, and wp-includes.' , [
19761976 'copy:npm-packages' ,
19771977 'copy:vendor-js' ,
19781978 'copy:admin-js' ,
19791979 'copy:includes-js'
19801980 ] ) ;
19811981
1982- grunt . registerTask ( 'uglify:all' , [
1982+ grunt . registerTask ( 'uglify:all' , 'Minifies all JavaScript files.' , [
19831983 'uglify:core' ,
19841984 'uglify:emoji-loader' ,
19851985 'uglify:jquery-ui' ,
@@ -1990,20 +1990,20 @@ module.exports = function(grunt) {
19901990 'uglify:wp-polyfill-fetch'
19911991 ] ) ;
19921992
1993- grunt . registerTask ( 'build:codemirror' , [
1993+ grunt . registerTask ( 'build:codemirror' , 'Builds the CodeMirror script and styles.' , [
19941994 'webpack:codemirror' ,
19951995 'cssmin:codemirror' ,
19961996 'usebanner:codemirror' ,
19971997 'copy:codemirror'
19981998 ] ) ;
19991999
2000- grunt . registerTask ( 'build:webpack' , [
2000+ grunt . registerTask ( 'build:webpack' , 'Cleans the webpack assets and runs the production and development webpack builds.' , [
20012001 'clean:webpack-assets' ,
20022002 'webpack:prod' ,
20032003 'webpack:dev' ,
20042004 ] ) ;
20052005
2006- grunt . registerTask ( 'build:js' , [
2006+ grunt . registerTask ( 'build:js' , 'Builds all JavaScript files.' , [
20072007 'clean:js' ,
20082008 'build:webpack' ,
20092009 'copy:js' ,
@@ -2013,7 +2013,7 @@ module.exports = function(grunt) {
20132013 'concat:emoji'
20142014 ] ) ;
20152015
2016- grunt . registerTask ( 'build:css' , [
2016+ grunt . registerTask ( 'build:css' , 'Builds all CSS files, including the RTL and admin color scheme stylesheets.' , [
20172017 'clean:css' ,
20182018 'copy:wp-admin-css-compat-rtl' ,
20192019 'copy:wp-admin-css-compat-min' ,
@@ -2104,38 +2104,38 @@ module.exports = function(grunt) {
21042104 } ) ;
21052105 } ) ;
21062106
2107- grunt . registerTask ( 'build:certificates' , [
2107+ grunt . registerTask ( 'build:certificates' , 'Copies the certificate authority bundle into wp-includes.' , [
21082108 'copy:certificates'
21092109 ] ) ;
21102110
2111- grunt . registerTask ( 'certificates:upgrade' , [
2111+ grunt . registerTask ( 'certificates:upgrade' , 'Upgrades the certificate authority bundle package and copies the bundle into wp-includes.' , [
21122112 'certificates:upgrade-package' ,
21132113 'copy:certificates'
21142114 ] ) ;
21152115
2116- grunt . registerTask ( 'build:files' , [
2116+ grunt . registerTask ( 'build:files' , 'Cleans the build directory and copies the core files into it.' , [
21172117 'clean:files' ,
21182118 'copy:files' ,
21192119 'copy:version' ,
21202120 ] ) ;
21212121
2122- grunt . registerTask ( 'replace:workflow-references-local-to-remote' , [
2122+ grunt . registerTask ( 'replace:workflow-references-local-to-remote' , 'Replaces local reusable workflow references with references to trunk.' , [
21232123 'copy:workflow-references-local-to-remote' ,
21242124 ] ) ;
21252125
2126- grunt . registerTask ( 'replace:workflow-references-remote-to-local' , [
2126+ grunt . registerTask ( 'replace:workflow-references-remote-to-local' , 'Replaces reusable workflow references to trunk with local references.' , [
21272127 'copy:workflow-references-remote-to-local' ,
21282128 ] ) ;
21292129
2130- grunt . registerTask ( 'post-branching' , [
2130+ grunt . registerTask ( 'post-branching' , 'Removes unneeded workflows and points reusable workflow references to trunk after branching.' , [
21312131 'clean:workflows' ,
21322132 'replace:workflow-references-local-to-remote'
21332133 ] ) ;
21342134
21352135 /**
21362136 * Build verification tasks.
21372137 */
2138- grunt . registerTask ( 'verify:build' , [
2138+ grunt . registerTask ( 'verify:build' , 'Runs all build verification tasks.' , [
21392139 'verify:old-files' ,
21402140 'verify:source-maps' ,
21412141 ] ) ;
@@ -2145,7 +2145,7 @@ module.exports = function(grunt) {
21452145 *
21462146 * @ticket 36083
21472147 */
2148- grunt . registerTask ( 'verify:old-files' , function ( ) {
2148+ grunt . registerTask ( 'verify:old-files' , 'Verifies that no files listed in $_old_files exist in the build directory.' , function ( ) {
21492149 const file = `${ BUILD_DIR } wp-admin/includes/update-core.php` ;
21502150
21512151 assert (
@@ -2205,7 +2205,7 @@ module.exports = function(grunt) {
22052205 * @ticket 46218
22062206 * @ticket 60348
22072207 */
2208- grunt . registerTask ( 'verify:source-maps' , function ( ) {
2208+ grunt . registerTask ( 'verify:source-maps' , 'Verifies that built JavaScript files do not contain source map links.' , function ( ) {
22092209 const ignoredFiles = [
22102210 'build/wp-includes/js/dist/components.js' ,
22112211 'build/wp-includes/js/dist/data.js' ,
@@ -2291,7 +2291,7 @@ module.exports = function(grunt) {
22912291 } ) ;
22922292
22932293 // Detects and copies stable routes.
2294- grunt . registerTask ( 'build:routes' , [
2294+ grunt . registerTask ( 'build:routes' , 'Detects and copies the stable Gutenberg routes.' , [
22952295 'routes:setup' ,
22962296 'copy:routes' ,
22972297 ] ) ;
@@ -2303,7 +2303,7 @@ module.exports = function(grunt) {
23032303 *
23042304 * Because all of these tasks write to src/, the outcome is identical for build and build:dev.
23052305 */
2306- grunt . registerTask ( 'build:gutenberg' , [
2306+ grunt . registerTask ( 'build:gutenberg' , 'Refreshes the Gutenberg-sourced content in src/.' , [
23072307 'clean:gutenberg' ,
23082308 'copy:gutenberg-php' ,
23092309 'build:routes' ,
@@ -2316,7 +2316,7 @@ module.exports = function(grunt) {
23162316 'copy:icon-library-manifest' ,
23172317 ] ) ;
23182318
2319- grunt . registerTask ( 'build' , function ( ) {
2319+ grunt . registerTask ( 'build' , 'Builds WordPress. Use --dev to build into src/ for development.' , function ( ) {
23202320 if ( grunt . option ( 'dev' ) ) {
23212321 grunt . task . run ( [
23222322 'gutenberg:verify' ,
@@ -2341,7 +2341,7 @@ module.exports = function(grunt) {
23412341 }
23422342 } ) ;
23432343
2344- grunt . registerTask ( 'prerelease' , [
2344+ grunt . registerTask ( 'prerelease' , 'Runs formatting checks, linting, tests, and image optimization in preparation for a release.' , [
23452345 'format:php:error' ,
23462346 'precommit:php' ,
23472347 'precommit:js' ,
@@ -2482,7 +2482,7 @@ module.exports = function(grunt) {
24822482 grunt . registerTask ( 'apply' , 'patch' ) ;
24832483
24842484 // Default task.
2485- grunt . registerTask ( 'default' , [ 'build' ] ) ;
2485+ grunt . registerTask ( 'default' , 'Runs the build task.' , [ 'build' ] ) ;
24862486
24872487 /*
24882488 * Automatically updates the `:dynamic` configurations
0 commit comments