mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Add setup script for development (#981)
This commit is contained in:
parent
505ee6d3cf
commit
e692f3814d
6 changed files with 82 additions and 16 deletions
18
tools/dev-setup.mjs
Normal file
18
tools/dev-setup.mjs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env node
|
||||
import fs from 'fs';
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const foundryPath = args.find(arg => arg.startsWith('--foundry-path='))?.split('=')[1];
|
||||
const dataPath = args.find(arg => arg.startsWith('--data-path='))?.split('=')[1];
|
||||
|
||||
if (!foundryPath || !dataPath) {
|
||||
console.log('Usage: npm run setup:dev -- --foundry-path="/path/to/foundry/main.js" --data-path="/path/to/data"');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const envContent = `FOUNDRY_MAIN_PATH=${foundryPath}
|
||||
FOUNDRY_DATA_PATH=${dataPath}
|
||||
`;
|
||||
|
||||
fs.writeFileSync('.env', envContent);
|
||||
console.log(`✅ Development environment configured: ${foundryPath}, ${dataPath}`);
|
||||
Loading…
Add table
Add a link
Reference in a new issue