-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
4,608 additions
and
32,171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.