From a5955364ddae89cb66bfb9579d4285f9370f12ec Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Sun, 14 Jul 2019 18:53:22 -0500 Subject: [PATCH] Add @babel/core (parcel v7 stuff) --- lib/tasks/api.rake | 14 ++++++++++---- package.json | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/tasks/api.rake b/lib/tasks/api.rake index 148bed669..5ee72b73d 100644 --- a/lib/tasks/api.rake +++ b/lib/tasks/api.rake @@ -64,12 +64,18 @@ namespace :api do sh [intro, opts].join(" ") end + def clean_assets + # Clear out cache and previous builds on initial load. + sh [ + "rm -rf", + DashboardController::CACHE_DIR, + DashboardController::PUBLIC_OUTPUT_DIR, + ].join(" ") unless ENV["NO_CLEAN"] + end + desc "Serve javascript assets (via Parcel bundler)." task serve_assets: :environment do - # Clear out cache and previous builds on initial load. - sh ["rm -rf", - DashboardController::CACHE_DIR, - DashboardController::PUBLIC_OUTPUT_DIR].join(" ") unless ENV["NO_CLEAN"] + clean_assets parcel "watch", DashboardController::PARCEL_HMR_OPTS end diff --git a/package.json b/package.json index 36a3ae141..f780a6b10 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "author": "farmbot.io", "license": "MIT", "dependencies": { + "@babel/core": "7.5.4", "@blueprintjs/core": "3.17.1", "@blueprintjs/datetime": "3.11.0", "@blueprintjs/select": "3.9.0",