@flybywiresim/rollup-plugin-msfs
v0.3.1
Published
Rollup plugin for bundling Microsoft Flight Simulator HTML instruments
Downloads
32
Readme
About
Rollup plugin for bundling Microsoft Flight Simulator HTML instruments
Configuration
{
name: string, // Name of instrument (must be globally unique to all addons)
elementName: string, // Name of custom element
outputDir: string, // Output directory for instrument files
config: { index: string, isInteractive: boolean }, // Instrument configuration
instrumentDir?: string, // Name of instrument ouptut directory (sub-directory of `outputDir`). Defaults to `name`
jsBundle?: string, // Name of JS rollup bundle. Defaults to bundle.js
cssBundle?: string // Name of CSS rollup bundle. Defaults to bundle.css
imports?: string[], // List of HTML/JS imports to add to the template HTML file. Defaults to none
}
Example usage
const template = require('@flybywiresim/rollup-plugin-msfs');
// other plugins ...
template({
name: 'MFD',
elementName: 'a380x-mfd-element',
config,
imports: ['/JS/dataStorage.js'],
outputDir: `${__dirname}/../../A380X/html_ui/Pages/VCockpit/Instruments/A380X`,
}),
}