Skip to content

Commit e5ee81c

Browse files
committed
make link deps not bad
1 parent 64361c5 commit e5ee81c

5 files changed

Lines changed: 40 additions & 7 deletions

File tree

.env.template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ PUBLIC_API_URL=https://projects.penguinmod.com
22
PUBLIC_STUDIO_URL=https://studio.penguinmod.com
33
PUBLIC_BASIC_API_URL=https://penguinmod-basic-api.derpygamer2142.com
44
PUBLIC_MAX_UPLOAD_SIZE=32 # in megabytes
5-
PUBLIC_CAPTCHA_ENABLED=true # If this is false, it must also be false on API to function correctly.
5+
PUBLIC_CAPTCHA_ENABLED=true # If this is false, it must also be false on API to function correctly.
6+
7+
# only for local dev. you can leave empty if you don't have a local version
8+
PM_API_MODULE_PATH=/path/to/apimodule
9+
PM_MARKDOWN_NEW_PATH=/path/to/markdownnew
10+
PM_SVELTE_UI_PATH=/path/to/svelteui

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ scripts/sheet-token.js
2929

3030
# other
3131
.dev/*
32+
33+
.zed

link-deps.cjs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,17 @@
1717
* For SvelteUI specifically, you need to recompile with `npm run prepack` each time you make changes
1818
*/
1919
/** */
20+
require("dotenv").config({ quiet: true });
2021
const fs = require("fs");
2122
const path = require("path");
23+
const readline = require("readline-sync");
2224

2325
// TODO: request paths via node:readline
2426

2527
// CONFIG
26-
const pathPenguinModApiModule =
27-
"/home/ian/Documents/code/projects/penguinmod/PenguinMod-ApiModule";
28-
const pathPenguinModMarkDownNew =
29-
"/home/ian/Documents/code/projects/penguinmod/PenguinMod-MarkDownNew";
30-
const pathPenguinModSvelteUI =
31-
"/home/ian/Documents/code/projects/penguinmod/PenguinMod-SvelteUI";
28+
const pathPenguinModApiModule = process.env.PM_API_MODULE_PATH ?? readline.question("Path to API module (or empty if none): ");
29+
const pathPenguinModMarkDownNew = process.env.PM_MARKDOWN_NEW_PATH ?? readline.question("Path to Markdown New (or empty if none): ");
30+
const pathPenguinModSvelteUI = process.env.PM_SVELTE_UI_PATH ?? readline.question("Path to Svelte UI (or empty if none): ");
3231
const nodeModulesPathPenguinModApiModule = path.join(
3332
__dirname,
3433
"node_modules/penguinmod",

package-lock.json

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"@sveltejs/adapter-static": "^3.0.10",
2020
"@sveltejs/kit": "^2.16.0",
2121
"@sveltejs/vite-plugin-svelte": "^5.0.0",
22+
"dotenv": "^17.4.2",
23+
"readline-sync": "^1.4.10",
2224
"svelte": "^5.55.1",
2325
"vite": "^6.2.6"
2426
}

0 commit comments

Comments
 (0)