Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

see what happens if we ignore the directory already exists error

Mike McGann5657bdcd7ac6
diff --git a/tasks/buildJS.js b/tasks/buildJS.js
index d3a400af7..27be04165 100644
--- a/tasks/buildJS.js
+++ b/tasks/buildJS.js
@@ -15,7 +15,13 @@ const outputPath = outputDir + (isTest ? 'wv-test-bundle.js' : 'wv.js');
// Log what we're building, and in what environment
console.log('Building ' + outputPath + ' for ' + process.env.NODE_ENV);
-if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir);
+if (!fs.existsSync(outputDir)) {
+ try {
+ fs.mkdirSync(outputDir);
+ } catch (err) {
+ console.log(err);
+ }
+}
var bundler = browserify(entryPoint, {
debug: !isProduction, // Include source maps (makes bundle size larger)