From: Jérôme Benoit Date: Fri, 29 Jan 2021 12:19:57 +0000 (+0100) Subject: Use require in node.js scripts. X-Git-Tag: v1.0.1-0~105^2~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=68d2797d49e214d8e5ef174b27f213c2cd085ac4;p=e-mobility-charging-stations-simulator.git Use require in node.js scripts. Signed-off-by: Jérôme Benoit --- diff --git a/src/scripts/deleteChargingStations.js b/src/scripts/deleteChargingStations.js index b3c8d0f3..2e84eeba 100755 --- a/src/scripts/deleteChargingStations.js +++ b/src/scripts/deleteChargingStations.js @@ -1,7 +1,7 @@ #!/usr/bin/env node -import MongoClient from 'mongodb'; -import fs from 'fs'; +const MongoClient = require('mongodb'); +const fs = require('fs'); // This script deletes charging stations // Filter charging stations by id pattern diff --git a/src/scripts/setCSPublicFlag.js b/src/scripts/setCSPublicFlag.js index 79d8600d..3ecf5089 100755 --- a/src/scripts/setCSPublicFlag.js +++ b/src/scripts/setCSPublicFlag.js @@ -1,7 +1,7 @@ #!/usr/bin/env node -import MongoClient from 'mongodb'; -import fs from 'fs'; +const MongoClient = require('mongodb'); +const fs = require('fs'); // This script sets charging stations public or private // Filter charging stations by id pattern