Code Monkey home page Code Monkey logo

electron's Introduction

DISCLAIMER: This platform is currently in a preview state for installation and will be supported through the Capacitor CLI in an upcomming release of Capacitor.




Capacitor community support for the Electron platform.

Maintainers

Maintainer GitHub Social Sponsoring Company Primary
Mike Summerfeldt IT-MikeS @IT_MikeS Volunteer Yes

Maintenance Status: Actively Maintained

Documentation:

Doc: Class usage and config options

Doc: Create a plugin for the Electron platform

Basic Usage Steps:

  1. Build your webapp in your capacitor initiated project.
  2. Run npm i @capacitor-community/electron in your webapp project directory. This will install the platform and its dependancies along with placing a copy of your built webapp into the platform folder electron
  3. Open a terminal in the electron platform folder and run npm run electron:start to start your app with the default config.

Using your own image for the Splash Screen

@capacitor-community/electron looks in the YOUR_APP_ROOT/electron/assets folder for a splash.png file by default, but you can use your own image by using one of the following methods:

  1. Editing the splash.png file directly.
  2. Place your own image file into the assets folder and pass the imageFilePath property as part of splashScreen -> splashOptions into createCapacitorElectronApp(config). For example if your image was named myImage.gif (yes animated GIF's are valid) you would pass it like this:
  import {app, ......} from 'electron';
  import * as path from 'path';

  .....

  const myCapacitorApp = createCapacitorElectronApp({
    splashScreen: {
      splashOptions: {
        imageFilePath: path.join(app.getAppPath(), "assets", "myImage.gif")
      }
    }
  });

Great electron packages to consider for your project.

  • Electron-Unhandled: Catch unhandled errors and promise rejections in your Electron app.
  • Electron-Timber: Pretty console logger for Electron apps.
  • Electron-Util: Useful utilities for Electron apps and modules.
  • Electron-Debug: Adds useful debug features to your Electron app.
  • Devtron: An open source tool to help you inspect, monitor, and debug your Electron app.
  • Electron-Better-IPC: Simplified IPC communication for Electron apps.
  • Electron-Store: Simple data persistence for your Electron app - Save and load user preferences, app state, cache, etc

And more can be found on the Awesome Electron List.

Contributors ✨


Max Lynch

πŸ’» πŸ“–

Mike S

πŸ’» πŸ“–

Daniel Sogl

πŸ’»

HervΓ© de CHAVIGNY

πŸ’» πŸ“–

electron's People

Contributors

it-mikes avatar mlynch avatar vevedh avatar allcontributors[bot] avatar danielsogl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.