Skip to content

Commit

Permalink
example tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
Saschl committed Oct 1, 2023
1 parent ad14a2c commit 7aa7a52
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
15 changes: 8 additions & 7 deletions fbw-a32nx/src/systems/instruments/buildSrc/igniter/tasks.mjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import fs from 'fs';
import { join } from 'path';
import { ExecTask } from '@flybywiresim/igniter';
import { ExecTask, TaskOfTasks } from '@flybywiresim/igniter';
import { Directories } from '../directories.mjs';

export function getInstrumentsIgniterTasks() {
const baseInstruments = fs.readdirSync(join(Directories.instruments, 'src'), { withFileTypes: true })
.filter((d) => d.isDirectory() && fs.existsSync(join(Directories.instruments, 'src', d.name, 'config.json')));

return baseInstruments.map(({ name }) => new ExecTask(
name,
`cd fbw-a32nx && mach build -f ${name}`,
return baseInstruments.map((instrument) => new TaskOfTasks(`${instrument.name}`, [new ExecTask(
instrument.name,
`cd fbw-a32nx && mach build -f ${instrument.name}`,
[
join('fbw-a32nx/src/systems/instruments/src', name),
join('fbw-a32nx/src/systems/instruments/src', instrument.name),
'fbw-a32nx/src/systems/instruments/src/Common',
join('fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX', name),
join('fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX', instrument.name),
],
));
),
new ExecTask(`${instrument.name}_tsc`, `tsc -noemit -p ${join(Directories.instruments, 'src', instrument.name, 'tsconfig.json')} 1>&2`)]));
}
2 changes: 1 addition & 1 deletion fbw-a32nx/src/systems/instruments/src/EFB/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const ErrorFallback = ({ resetErrorBoundary }: ErrorFallbackProps) => {
</>
)}

<div className="py-4 px-8 w-full text-theme-body hover:text-utility-red bg-utility-red hover:bg-theme-body rounded-md border-2 border-utility-red transition duration-100" onClick={resetErrorBoundary}>
<div className="py-4 px-8 w-full rounded-md border-2 transition duration-100 text-theme-body hover:text-utility-red bg-utility-red hover:bg-theme-body border-utility-red" onClick={resetErrorBoundary}>
<h2 className="font-bold text-center text-current">Reset Display</h2>
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions fbw-a32nx/src/systems/instruments/src/EFB/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"resolveJsonModule" : true
}
"resolveJsonModule" : true,
"skipLibCheck": true
},
"include": ["*.tsx", "*.ts"],
"exclude": ["vite.config.ts"]

}

0 comments on commit 7aa7a52

Please sign in to comment.