mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
* Set up DhLevelTier datamodel * Added Levelup data model and started at the render * Fixed data handling in the LevelUp view * Added back the save function * Finalised levelup selections and propagating to PC * Added level advancement selection data * Added DomainCard selection * Css merge commit * Added PC level/delevel benefits of leveling up * Fixed sticky previous selections on continous leveling * Fixed up Summary. Fixed multiclass/subclass blocking on selection * Removed unused level.hbs * Fixed attribute base for PC * Improved naming of attribute properties * Renamed/structured resources/evasion/proficiency * Improved trait marking * Rework to level up once at a time * Added markers * Removed tabs when in Summary * Fixed multilevel buttons * Improved multiclass/subclass recognition * Fixed tagify error on selection * Review fixes
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
import fs from 'fs';
|
|
import path from 'path';
|
|
import readline from 'readline';
|
|
|
|
console.log('Reforging Symlinks');
|
|
|
|
const askQuestion = question => {
|
|
const rl = readline.createInterface({
|
|
input: process.stdin,
|
|
output: process.stdout
|
|
});
|
|
|
|
return new Promise(resolve =>
|
|
rl.question(question, answer => {
|
|
rl.close();
|
|
resolve(answer);
|
|
})
|
|
);
|
|
};
|
|
|
|
const installPath = await askQuestion('Enter your Foundry install path: ');
|
|
|
|
// Determine if it's an Electron install (nested structure)
|
|
const nested = fs.existsSync(path.join(installPath, 'resources', 'app'));
|
|
const fileRoot = nested ? path.join(installPath, 'resources', 'app') : installPath;
|
|
|
|
try {
|
|
await fs.promises.mkdir('foundry');
|
|
} catch (e) {
|
|
if (e.code !== 'EEXIST') throw e;
|
|
}
|
|
|
|
// JavaScript files
|
|
for (const p of ['client', 'common', 'tsconfig.json']) {
|
|
try {
|
|
await fs.promises.symlink(path.join(fileRoot, p), path.join('foundry', p));
|
|
} catch (e) {
|
|
if (e.code !== 'EEXIST') throw e;
|
|
}
|
|
}
|
|
|
|
// Language files
|
|
try {
|
|
await fs.promises.symlink(path.join(fileRoot, 'public', 'lang'), path.join('foundry', 'lang'));
|
|
} catch (e) {
|
|
if (e.code !== 'EEXIST') throw e;
|
|
}
|