electron-splashscreen-for-angular
v1.0.1
Published
<img src="https://raw.githubusercontent.com/trodi/electron-splashscreen/master/icon.svg?sanitize=true" width="200" height="200" align="right" />
Downloads
4
Maintainers
Readme
electron-splashscreen
Simple splashscreen for Electron applications.
Ideally, your application loads instantaneously. However, some applications are larger and/or may be running on a slower machine, causing the load to take longer. If the application is taking a bit to load, 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 incorperate, while allowing you the freedom to customize with any look, feel, and functionality.
No external dependencies.
Install
npm install @trodi/electron-splashscreen
Usage
Typescript Usage (javascript would be similar)
Example of your Electron browser process.
// 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
Build
npm run build
Publish
npm version <patch|minor|major>
npm publish
- Commit and push changes to git