Index: .gitignore
===================================================================
--- .gitignore	(revision 47474)
+++ .gitignore	(working copy)
@@ -28,6 +28,7 @@
 /src/wp-includes/css/dist
 /src/wp-includes/css/*.min.css
 /src/wp-includes/css/*-rtl.css
+/packagehash.txt
 
 # Files and folders that get created in wp-content
 /src/wp-content/blogs.dir
Index: Gruntfile.js
===================================================================
--- Gruntfile.js	(revision 47474)
+++ Gruntfile.js	(working copy)
@@ -2,6 +2,7 @@
 /* jshint esversion: 6 */
 /* globals Set */
 var webpackConfig = require( './webpack.config' );
+var installChanged = require( 'install-changed' );
 
 module.exports = function(grunt) {
 	var path = require('path'),
@@ -41,6 +42,9 @@
 		);
 	}
 
+	// 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.
Index: package-lock.json
===================================================================
--- package-lock.json	(revision 47474)
+++ package-lock.json	(working copy)
@@ -11652,6 +11652,12 @@
 				}
 			}
 		},
+		"install-changed": {
+			"version": "1.1.0",
+			"resolved": "https://registry.npmjs.org/install-changed/-/install-changed-1.1.0.tgz",
+			"integrity": "sha512-APUWMdQnwGcyv9bmuvgxCcrR6qtD996+hofEEAPGSjsvGIZuBpBF0yrYAKOl9tmhm2AzxJC4EXUbxZ/SId4NIA==",
+			"dev": true
+		},
 		"internal-ip": {
 			"version": "4.3.0",
 			"resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz",
Index: package.json
===================================================================
--- package.json	(revision 47474)
+++ package.json	(working copy)
@@ -59,6 +59,7 @@
 		"grunt-sass": "~3.1.0",
 		"grunt-webpack": "^3.1.3",
 		"ink-docstrap": "1.3.2",
+		"install-changed": "1.1.0",
 		"jquery-migrate": "1.4.1",
 		"matchdep": "~2.0.0",
 		"node-sass": "~4.13.1",
Index: .
===================================================================
--- .	(revision 47474)
+++ .	(working copy)

Property changes on: .
___________________________________________________________________
Modified: svn:ignore
## -14,3 +14,4 ##
 jsdoc
 vendor
 docker-compose.override.yml
+packagehash.txt
