diff --git a/gulpfile.js b/gulpfile.js index 853547c023..fb070f39b5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -285,15 +285,29 @@ function checkForDuplicateCesium() { } } +gulp.task("maki", function (done) { + var spawnSync = require("child_process").spawnSync; + var result = spawnSync("node", ["wwwroot/images/maki/maki.js"], { + stdio: "inherit" + }); + if (result.status !== 0) { + throw new PluginError("maki", "Maki script failed", { showStack: false }); + } + done(); +}); + gulp.task("terriajs-server", terriajsServerGulpTask(3001)); -gulp.task("build", gulp.series("copy-terriajs-assets", "build-app")); -gulp.task("release", gulp.series("copy-terriajs-assets", "release-app")); +gulp.task("build", gulp.series("maki", "copy-terriajs-assets", "build-app")); +gulp.task( + "release", + gulp.series("maki", "copy-terriajs-assets", "release-app") +); gulp.task("watch", gulp.parallel("watch-terriajs-assets", "watch-app")); // Run render-index before starting terriajs-server because terriajs-server won't // start if index.html isn't present gulp.task( "dev", - gulp.parallel(gulp.series("render-index", "terriajs-server"), "watch") + gulp.parallel(gulp.series("maki", "render-index", "terriajs-server"), "watch") ); gulp.task("default", gulp.series("lint", "build")); diff --git a/package.json b/package.json index 0127f87369..8c242101bb 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "start": "terriajs-server --config-file serverconfig.json", "gulp": "gulp", "maki": "node wwwroot/images/maki/maki.js", - "postinstall": "yarn maki && echo 'Installation successful. What to do next:\\n yarn gulp dev # Starts the server on port 3001, builds TerriaMap and dependencies, and rebuilds if files change.'", + "postinstall": "echo 'Installation successful. What to do next:\\n yarn gulp dev # Starts the server on port 3001, builds TerriaMap and dependencies, and rebuilds if files change.'", "hot": "webpack-dev-server --inline --config buildprocess/webpack.config.hot.js --hot --host 0.0.0.0", "prettier": "prettier --write .", "prettier-check": "prettier --check ."