fix(project): Minor fixes and cleanup

This commit is contained in:
2025-01-29 17:56:21 +01:00
parent a039a58f8e
commit b90234e226
13 changed files with 44 additions and 23 deletions

View File

@@ -7,7 +7,9 @@ import { Project } from '../classes.project.js';
export const run = async (projectArg: Project) => {
// lets care about tsconfig.json
logger.log('info', 'Formatting tsconfig.json...');
const tsconfigSmartfile = await plugins.smartfile.SmartFile.fromFilePath(plugins.path.join(paths.cwd, 'tsconfig.json'));
const tsconfigSmartfile = await plugins.smartfile.SmartFile.fromFilePath(
plugins.path.join(paths.cwd, 'tsconfig.json'),
);
const tsconfigObject = JSON.parse(tsconfigSmartfile.contentBuffer.toString());
tsconfigObject.compilerOptions = tsconfigObject.compilerOptions || {};
tsconfigObject.compilerOptions.baseUrl = '.';
@@ -21,4 +23,4 @@ export const run = async (projectArg: Project) => {
}
tsconfigSmartfile.setContentsFromString(JSON.stringify(tsconfigObject, null, 2));
await tsconfigSmartfile.write();
};
};