
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
electron-forge
Advanced tools
The simple way to get started with Electron
npm install -g electron-forge
electron-forge init my-new-app
cd my-new-app
electron-forge start
Funnily enough, no :D. This is not another build tool, electron-forge
simply
unifies the existing (and well maintained) build tools for Electron development
into one, simple, easy to use package so that anyone can just jump right in
to Electron development.
This project has a few main goals.
babel
, browserify
, webpack
or
any of that nonsense. Everything should just work for them out of the box.With these goals in mind, under the hood this project uses
electron-compile
: a tool
that lets you use modern and futuristic langauges inside Electron without
worrying about transpiling or build tooling.
Glad you asked, it's beyond easy to get started with electron-forge
.
npm install -g electron-forge
electron-forge init my-new-project
This command will generate you a brand new project folder and install all your NPM dependencies so you will be all set to go. By default we will also install airbnb
linting modules. If you want to follow the standard
linting rules instead use the --lintstyle=standard
argument.
electron-forge start
Any args after "start" will be passed through to your application when it is launched.
electron-forge package
Yes, it really is that simple. If you want to specify platform / arch, use the
--platform=<platform>
and --arch=<arch>
arguments.
electron-forge make
This will generate platform specific distributables for you. Note you can only generate distributables for your current platform.
electron-forge lint
Once you have generated a project your package.json
file will have some default forge
config. Below is the reference structure for this config object.
{
"make_targets": {
"win32": ["squirrel"], // An array of win32 make targets
"darwin": ["zip", "dmg"], // An array of darwin make targets
"linux": ["deb", "rpm", "flatpak"] // An array of linux make targets
},
"electronPackagerConfig": {},
"electronWinstallerConfig": {},
"electronInstallerDMG": {},
"electronInstallerFlatpak": {},
"electronInstallerDebian": {},
"electronInstallerRedhat": {}
}
make
targetsTarget Name | Available Platforms | Description | Configurable Options | Default? | Requirements |
---|---|---|---|---|---|
zip | All | Zips your packaged application | None | Yes | zip on Darwin/Linux |
squirrel | Windows | Generates an installer and .nupkg files for Squirrel.Windows | electronWinstallerConfig | Yes | |
dmg | Darwin | Generates a DMG file | electronInstallerDMG | No | |
deb | Linux | Generates a Debian installer | electronInstallerDebian | Yes | fakeroot and dpkg |
rpm | Linux | Generates a Redhat installer | electronInstallerRedhat | Yes | rpm |
flatpak | Linux | Generates a flatpak file | electronInstallerFlatpak | No | flatpak-builder |
package
You can set electronPackagerConfig
with any of the options from Electron Packager.
NOTE: The afterCopy
and afterExtract
are mapped to require
calls internally so provide a path to a file that exports your hooks and they will still run.
FAQs
A complete tool for building modern Electron applications
The npm package electron-forge receives a total of 1,080 weekly downloads. As such, electron-forge popularity was classified as popular.
We found that electron-forge demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.