mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-07 21:34:16 +02:00
Fancier dev setup
This commit is contained in:
parent
a4428fd5be
commit
ba738244ab
7 changed files with 107 additions and 73 deletions
|
|
@ -1,21 +1,10 @@
|
|||
#!/usr/bin/env node
|
||||
import { spawn } from 'child_process';
|
||||
import { readEnvFile } from './util.mjs';
|
||||
import fs from 'fs';
|
||||
|
||||
// Load .env file if it exists
|
||||
if (fs.existsSync('.env')) {
|
||||
const envFile = fs.readFileSync('.env', 'utf8');
|
||||
envFile.split('\n').forEach(line => {
|
||||
const [key, value] = line.split('=');
|
||||
if (key && value) {
|
||||
process.env[key] = value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Set defaults if not in environment
|
||||
const foundryPath = process.env.FOUNDRY_MAIN_PATH || '../../../../FoundryDev/main.js';
|
||||
const dataPath = process.env.FOUNDRY_DATA_PATH || '../../../';
|
||||
// Load .env file params
|
||||
const { foundryPath, dataPath } = readEnvFile();
|
||||
|
||||
// Run the original command with proper environment
|
||||
const args = ['rollup -c --watch', `node "\"${foundryPath}\"" --dataPath="${dataPath}" --noupnp`, 'gulp'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue