diff --git a/.travis.yml b/.travis.yml
index 0e186dc8c7..c866b87e6e 100644
a
|
b
|
before_script: |
89 | 89 | - npm --version |
90 | 90 | - node --version |
91 | 91 | - nvm install 10.13.0 |
92 | | - npm install -g grunt-cli |
93 | 92 | - npm install |
94 | 93 | - npm prune |
95 | 94 | - mysql --version |
… |
… |
before_script: |
101 | 100 | - which phpunit |
102 | 101 | - phpunit --version |
103 | 102 | - curl --version |
104 | | - grunt --version |
105 | 103 | - git --version |
106 | 104 | - svn --version |
107 | 105 | - locale -a |
108 | | script: grunt $WP_TRAVISCI |
| 106 | script: npm run grunt $WP_TRAVISCI |
109 | 107 | after_script: |
110 | 108 | - | |
111 | 109 | if [[ "$WP_TEST_REPORTER" == "true" ]]; then |
diff --git a/appveyor.yml b/appveyor.yml
index cb0a8ae453..f5d7edf00a 100644
a
|
b
|
branches: |
11 | 11 | install: |
12 | 12 | - ps: Install-Product node $env:nodejs_version |
13 | 13 | - npm install npm -g |
14 | | - npm install grunt-cli -g |
15 | 14 | - npm install |
16 | 15 | |
17 | 16 | before_build: |
… |
… |
before_build: |
19 | 18 | - npm --version |
20 | 19 | |
21 | 20 | build_script: |
22 | | - cmd: "grunt build" |
| 21 | - cmd: "npm run build" |
23 | 22 | |
24 | 23 | test: off |
25 | 24 | |
diff --git a/package.json b/package.json
index 5dc8dc6756..d8a2b7cf1e 100644
a
|
b
|
|
113 | 113 | "whatwg-fetch": "3.0.0" |
114 | 114 | }, |
115 | 115 | "scripts": { |
| 116 | "build": "grunt build", |
| 117 | "test": "grunt test", |
| 118 | "watch": "grunt watch", |
116 | 119 | "grunt": "grunt" |
117 | 120 | } |
118 | 121 | } |
diff --git a/src/index.php b/src/index.php
index c76c36d72d..747b6db178 100644
a
|
b
|
$die = __( 'You are running WordPress without JavaScript and CSS files. These ne |
34 | 34 | |
35 | 35 | $die .= '<p>' . sprintf( |
36 | 36 | /* translators: %s: npm install */ |
37 | | __( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running %s.' ), |
| 37 | __( 'Before running any build tasks you need to make sure the dependencies are installed. You can install these by running %s.' ), |
38 | 38 | '<code style="color: green;">npm install</code>' |
39 | 39 | ) . '</p>'; |
40 | 40 | |
41 | 41 | $die .= '<ul>'; |
42 | 42 | $die .= '<li>' . __( 'To build WordPress while developing, run:' ) . '<br /><br />'; |
43 | | $die .= '<code style="color: green;">grunt build --dev</code></li>'; |
| 43 | $die .= '<code style="color: green;">npm run build --dev</code></li>'; |
44 | 44 | $die .= '<li>' . __( 'To build files automatically when changing the source files, run:' ) . '<br /><br />'; |
45 | | $die .= '<code style="color: green;">grunt watch</code></li>'; |
| 45 | $die .= '<code style="color: green;">npm run watch</code></li>'; |
46 | 46 | $die .= '<li>' . __( 'To create a production build of WordPress, run:' ) . '<br /><br />'; |
47 | | $die .= '<code style="color: green;">grunt build</code></li>'; |
| 47 | $die .= '<code style="color: green;">npm run build</code></li>'; |
48 | 48 | $die .= '</ul>'; |
49 | 49 | |
50 | 50 | $die .= '<p>' . sprintf( |
51 | | /* translators: 1: NPM URL, 2: Grunt URL, 3: Handbook URL */ |
52 | | __( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ), |
| 51 | /* translators: 1: NPM URL, 2: Handbook URL */ |
| 52 | __( 'This requires <a href="%1$s">NPM</a>. <a href="%2$s">Read more about setting up your local development environment</a>.' ), |
53 | 53 | 'https://www.npmjs.com/get-npm', |
54 | | 'https://gruntjs.com/getting-started', |
55 | 54 | __( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' ) |
56 | 55 | ) . '</p>'; |
57 | 56 | |
diff --git a/src/wp-includes/embed.php b/src/wp-includes/embed.php
index 6bc220e9ad..76d937cd6c 100644
a
|
b
|
function get_post_embed_html( $width, $height, $post = null ) { |
446 | 446 | } else { |
447 | 447 | /* |
448 | 448 | * If you're looking at a src version of this file, you'll see an "include" |
449 | | * statement below. This is used by the `grunt build` process to directly |
| 449 | * statement below. This is used by the `npm run build` process to directly |
450 | 450 | * include a minified version of wp-embed.js, instead of using the |
451 | 451 | * file_get_contents() method from above. |
452 | 452 | * |
… |
… |
function print_embed_styles() { |
1008 | 1008 | } else { |
1009 | 1009 | /* |
1010 | 1010 | * If you're looking at a src version of this file, you'll see an "include" |
1011 | | * statement below. This is used by the `grunt build` process to directly |
| 1011 | * statement below. This is used by the `npm run build` process to directly |
1012 | 1012 | * include a minified version of wp-oembed-embed.css, instead of using the |
1013 | 1013 | * readfile() method from above. |
1014 | 1014 | * |
… |
… |
function print_embed_scripts() { |
1039 | 1039 | } else { |
1040 | 1040 | /* |
1041 | 1041 | * If you're looking at a src version of this file, you'll see an "include" |
1042 | | * statement below. This is used by the `grunt build` process to directly |
| 1042 | * statement below. This is used by the `npm run build` process to directly |
1043 | 1043 | * include a minified version of wp-embed-template.js, instead of using the |
1044 | 1044 | * readfile() method from above. |
1045 | 1045 | * |
diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index 0800f0ef95..30194cac9f 100644
a
|
b
|
function _print_emoji_detection_script() { |
5518 | 5518 | |
5519 | 5519 | /* |
5520 | 5520 | * If you're looking at a src version of this file, you'll see an "include" |
5521 | | * statement below. This is used by the `grunt build` process to directly |
| 5521 | * statement below. This is used by the `npm run build` process to directly |
5522 | 5522 | * include a minified version of wp-emoji-loader.js, instead of using the |
5523 | 5523 | * readfile() method from above. |
5524 | 5524 | * |
… |
… |
function wp_staticize_emoji_for_email( $mail ) { |
5734 | 5734 | * Returns arrays of emoji data. |
5735 | 5735 | * |
5736 | 5736 | * These arrays are automatically built from the regex in twemoji.js - if they need to be updated, |
5737 | | * you should update the regex there, then run the `grunt precommit:emoji` job. |
| 5737 | * you should update the regex there, then run the `npm run grunt precommit:emoji` job. |
5738 | 5738 | * |
5739 | 5739 | * @since 4.9.0 |
5740 | 5740 | * @access private |
diff --git a/tests/phpunit/includes/bootstrap.php b/tests/phpunit/includes/bootstrap.php
index 23faca64e5..f46f56d7cb 100644
a
|
b
|
if ( version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) { |
47 | 47 | } |
48 | 48 | |
49 | 49 | if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && ! is_dir( ABSPATH ) ) { |
50 | | echo "ERROR: The /build/ directory is missing! Please run `grunt build` prior to running PHPUnit.\n"; |
| 50 | echo "ERROR: The /build/ directory is missing! Please run `npm run build` prior to running PHPUnit.\n"; |
51 | 51 | exit( 1 ); |
52 | 52 | } |
53 | 53 | |
diff --git a/tests/phpunit/tests/oembed/template.php b/tests/phpunit/tests/oembed/template.php
index 95c532edb0..3d9b2b90c1 100644
a
|
b
|
class Tests_Embed_Template extends WP_UnitTestCase { |
309 | 309 | * So this test checks for ampersands in build/wp-includes/js/wp-embed.min.js. |
310 | 310 | * In many cases, this file will not exist; in those cases, we simply skip the test. |
311 | 311 | * |
312 | | * So when would it be run? We have Travis CI run `grunt test` which then runs, in order, |
| 312 | * So when would it be run? We have Travis CI run `npm run test` which then runs, in order, |
313 | 313 | * `qunit:compiled` (which runs the build) and then `phpunit`. Thus, this test will at least be |
314 | 314 | * run during continuous integration. |
315 | 315 | * |