Skip to content

Commit

Permalink
refactor: fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjozork committed Jan 31, 2023
1 parent ec9487b commit 683f8f1
Show file tree
Hide file tree
Showing 6 changed files with 4,608 additions and 32,171 deletions.
41 changes: 41 additions & 0 deletions fbw-a32nx/src/systems/fmgc/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
'use strict';

const esbuild = require('esbuild');
const path = require('path');
const { copy } = require('esbuild-plugin-copy');

const rootDir = path.join(__dirname, '..', '..', '..');
const outFile = 'out/flybywire-aircraft-a320-neo/html_ui/JS/fmgc/fmgc.js';

const isProductionBuild = process.env.A32NX_PRODUCTION_BUILD === '1';

esbuild.build({
absWorkingDir: __dirname,

plugins: [
copy({
assets: {
// This is required because the copy plugin excepts `from` to be relative to `process.cwd()` - and fails silently on Windows paths
from: path.relative(process.cwd(), path.join(__dirname, 'src/utils/LzUtf8.js')).replaceAll('\\', '/'),
to: 'LzUtf8.js',
},
}),
],

define: { DEBUG: 'false' },

entryPoints: ['src/index.ts'],
bundle: true,
treeShaking: true,
minify: isProductionBuild,

outfile: path.join(rootDir, outFile),

format: 'iife',
globalName: 'Fmgc',

sourcemap: isProductionBuild ? undefined : 'linked',

// Target approximate CoherentGT WebKit version
target: 'safari11',
});
59 changes: 0 additions & 59 deletions fbw-a32nx/src/systems/fmgc/rollup.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion fbw-a32nx/src/systems/instruments/src/PFD/PFD.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { A320Failure, FailuresConsumer } from '@flybywiresim/failures';
import { A320Failure, FailuresConsumer } from '@failures';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { ClockEvents, ComponentProps, DisplayComponent, EventBus, FSComponent, Subject, VNode } from 'msfssdk';
import { Arinc429Word } from '@shared/arinc429';
Expand Down
Loading

0 comments on commit 683f8f1

Please sign in to comment.