Build & Scripts - Incomplete-Infinity/eve-companion GitHub Wiki
π Build & Scripts
This page outlines the key development and build scripts used in the EVE Companion App. It explains how we automate tasks like documentation, Swagger client generation, and packaging for distribution.
π¦ package.json Scripts
The following scripts are available for development and maintenance:
"scripts": {
"start": "electron-forge start",
"make": "electron-forge make",
"package": "electron-forge package",
"generate-esi": "swagger-typescript-api generate --path https://esi.evetech.net/latest/swagger.json --output ./src/api/esi --name index.ts --axios --modular --union-enums",
"generate-docs": "jsdoc -c jsdoc.json",
"prepare": "npm run generate-esi && npm run generate-docs",
"test": "echo \"Error: no test specified\" && exit 1"
}
π§° Script Breakdown
Script | Purpose |
---|---|
start |
Launches the app in development mode using Electron Forge |
make |
Builds distributable packages for the current platform |
package |
Creates an unpackaged Electron app |
generate-esi |
Regenerates the ESI Swagger client (src/api/esi ) |
generate-docs |
Generates developer documentation using JSDoc (/docs ) |
prepare |
Runs both ESI generation and documentation (generate-esi + generate-docs ) |
π Regenerating Swagger ESI Client
To regenerate the client from ESI's live Swagger definition:
npm run generate-esi
This will populate/update the folder:
src/api/esi/
βββ apis/
βββ models/
βββ index.ts
β οΈ Recommended: Add
src/api/esi/
to.gitignore
if you donβt want to commit generated code.
π Generating JSDoc Documentation
To build updated documentation for the entire src/
directory:
npm run generate-docs
Output will be saved to:
docs/
This uses jsdoc.json
as the config file, and optionally better-docs
for theming.
π¦ Building the App
To create a distributable version of the app:
npm run make
This will use Electron Forge to create .zip
, .deb
, .rpm
, or .squirrel
installers depending on your OS.
To test the built app:
npm run package
This creates a local unpackaged Electron bundle for testing before packaging fully.
π Summary
- Scripts in
package.json
automate key parts of development - Use
prepare
to rebuild everything - Use
make
to create production-ready installers
Next: Dev & Debug Tools