Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Micosoft Windows #600

Merged
merged 3 commits into from
Oct 17, 2024
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
12 changes: 9 additions & 3 deletions scripts/create.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@ const pascalCasedName = toPascalCase(recipe); // PascalCased recipe ID only cont
(async () => {
// Folder paths
const userData =
process.env.APPDATA ||
(process.platform === 'darwin'
process.env.APPDATA || (
vraravam marked this conversation as resolved.
Show resolved Hide resolved
// Check if this script runs on Windows
process.platform === 'win32'
? `${process.env.USERPROFILE}\\AppData\\Roaming\\Ferdium\\recipes\\dev`
// If not, check for Darwin
: process.platform === 'darwin'
? `${process.env.HOME}/Library/Application Support`
: `${process.env.HOME}/.config`);
// If fails both checks, simply use this
: `${process.env.HOME}/.config`
);
const recipesFolder = path.join(userData, folderName, 'recipes');
const devRecipeFolder = path.join(recipesFolder, 'dev');
const newRecipeFolder = path.join(devRecipeFolder, recipe);
Expand Down
Loading