1.0.0 • Published 5 years ago

electron-splashscreen v1.0.0

Weekly downloads
245
License
MIT
Repository
-
Last release
5 years ago

Install

Yarn

yarn add electron-splashscreen

NPM

npm i electron-splashscreen

Example

import { initSplashScreen, OfficeTemplate } from 'electron-splashscreen';
import isDev from 'electron-is-dev';
import { resolve } from 'app-root-path';

const mainWindow = new BrowserWindow({
  ...
});

const hideSplashscreen = initSplashScreen({
  mainWindow,
  icon: isDev ? resolve('assets/icon.ico') : undefined,
  url: OfficeTemplate,
  width: 500,
  height: 300,
  brand: 'My Brand',
  productName: 'My App',
  logo: resolve('assets/logo.svg'),
  website: 'www.my-brand.com',
  text: 'Initializing ...'
});

You can now either within main:

mainWindow.once('ready-to-show', () => {
  mainWindow.show();
  hideSplashscreen();
});

or within renderer

// within renderer
import { reportReady } from 'electron-splashscreen';
// call this whenever your app is ready, for example after all data is loaded
reportReady();
1.0.0

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

7 years ago