Skip to content

Commit

Permalink
Clean up createEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansampson committed Jul 31, 2023
1 parent f11e49c commit 80d7b46
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/scripts/createEnv.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as fs from "fs";
import * as path from "path";

// Define the path of .env file
// Define the path of the .env file
const envPath = path.resolve(__dirname, "..", "..", ".env");

// Define the content of .env file
// Define the content of the .env file
const envContent = `
GOOGLE_AUTH_URL="https://calendar.google.com/"
GOOGLE_USERNAME="…"
Expand All @@ -23,9 +23,7 @@ SKIFF_PASSWORD="…"
SKIFF_STAY_SIGNED_IN="false"
`;

// Check if the file exists
fs.access(envPath, fs.constants.F_OK, (err) => {
// If the file does not exist, create it
if (err) {
fs.writeFile(envPath, envContent, (err) => {
if (err) {
Expand Down

0 comments on commit 80d7b46

Please sign in to comment.