Simple splashscreen for electron applications forked from https://github.com/trodi/electron-splashscreen
electron-splashscreen will appear so the user knows the application is loading, but can't interact with a partially loaded application.
electron-splashscreen is simple to incorporate, while allowing you the freedom to customize with any look, feel, and functionality.

npm install @trodi/electron-splashscreen
`
Usage
$3
Example of your Electron browser process.
`typescript
// import the module
import * as Splashscreen from "@trodi/electron-splashscreen";
const mainOpts: Electron.BrowserWindowConstructorOptions = ...
// configure the splashscreen
const config: Splashscreen.Config = {
windowOpts: mainOpts;
templateUrl: ${__dirname}/splash-screen.html;
splashScreenOpts: {
width: 425,
height: 325,
},
};
// initialize the splashscreen handling
const main: BrowserWindow = Splashscreen.initSplashScreen(config);
// load your browser window per usual
main.loadURL(file://index.html);
`
You can run examples via npm run example and npm run example-dynamic.
API
API Documentation
Build
npm run build
Publish
* npm version
* npm publish`