fix(project): Minor fixes and cleanup
This commit is contained in:
@ -92,7 +92,7 @@ export const run = async (projectArg: Project) => {
|
||||
// set overrides
|
||||
const overrides = plugins.smartfile.fs.toObjectSync(
|
||||
plugins.path.join(paths.assetsDir, 'overrides.json'),
|
||||
)
|
||||
);
|
||||
packageJson.pnpm = packageJson.pnpm || {};
|
||||
packageJson.pnpm.overrides = overrides;
|
||||
|
||||
|
@ -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();
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user