Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Improve logs when Functions/publish directories are specified #100

Merged
merged 1 commit into from
Nov 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions lib/steps/prepareFolders.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@ const { NETLIFY_PUBLISH_PATH, NETLIFY_FUNCTIONS_PATH } = require("../config");
// Empty existing publish and functions folders
const prepareFolders = ({ functionsPath, publishPath }) => {
logTitle("🚀 Next on Netlify 🚀");
log(" ", "Functions directory: ", functionsPath);
log(" ", "Publish directory: ", publishPath);
log(" ", "Make sure these are set in your netlify.toml file.");

if (functionsPath === NETLIFY_FUNCTIONS_PATH) {
log(" ", "Functions directory: ", functionsPath);
}
if (publishPath === NETLIFY_PUBLISH_PATH) {
log(" ", "Publish directory: ", publishPath);
}
if (
functionsPath === NETLIFY_FUNCTIONS_PATH ||
publishPath === NETLIFY_PUBLISH_PATH
) {
log(" ", "Make sure these are set in your netlify.toml file.");
}

if (publishPath === NETLIFY_PUBLISH_PATH) emptyDirSync(publishPath);
if (functionsPath === NETLIFY_FUNCTIONS_PATH) emptyDirSync(functionsPath);
Expand Down