|
@@ -8,6 +8,16 @@ const semver = require('semver');
|
|
|
const liveEditor = require('@gfxfundamentals/live-editor');
|
|
|
const liveEditorPath = path.dirname(require.resolve('@gfxfundamentals/live-editor'));
|
|
|
|
|
|
+function dependenciesNeedUpdating() {
|
|
|
+ const childProcess = require('child_process');
|
|
|
+ const result = JSON.parse(childProcess.execSync('npm install --dry-run --json').toString());
|
|
|
+ return result.added.length > 0 || result.updated.length > 0 || result.removed > 0;
|
|
|
+}
|
|
|
+
|
|
|
+if (dependenciesNeedUpdating()) {
|
|
|
+ throw new Error('dependencies need updating. Please run `npm install`');
|
|
|
+}
|
|
|
+
|
|
|
module.exports = function(grunt) {
|
|
|
|
|
|
require('load-grunt-tasks')(grunt);
|