Socket
Book a DemoInstallSign in
Socket

craco-electron

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

craco-electron

A drop-in replacement for react-scripts for Electron apps

1.1.2
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

CRACO Electron

A simple CRACO configuration for Electron apps.

react-scripts already included in dependencies. You don't need to install it.

TL;DR

  • Install it: npm or yarn add craco-electron

  • In your package.json:

{
    ...
    "scripts": {
-       "start": "react-scripts start",
+       "start-renderer": "craco-electron start",
-       "build": "react-scripts start",
+       "build-renderer": "craco-electron build"
    }
    ...
}

Default Presets

  • PORT=3500
  • BROWSER=none
  • PUBLIC_URL=./

Note: you can still override this variables.

Runtime usage

This library brings not only cli. You can use these helpers in runtime:

  • getFileFromPublic
  • getMainPageUrl

For api see src/.

TODO

  • Script start-main for starting Electron process
  • Change default src/ to src/react/

Keywords

react electron

FAQs

Package last updated on 19 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.