
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
electron-angular-toolkit
Advanced tools
A tool which helps to build electron applications with angular2
If you are upgrading from 0.0.3 please reinstall angular-cli first
This package provides a command line tool, which is supposed to make the development of electron applications with angular2 as simple as possible.
This package was tested with angular-cli@1.0.0-beta.22-1
Create a new project with the angular-cli and navigate to the created folder:
ng new myapp
cd myapp
Install angular-electron-toolkit
npm install electron-angular-toolkit --save-dev
Run the prepare command, this will install some packages, modify the fieles: package.json, angular-cli.json, src/index.html and it will create an entry point(src/electron-main.js)
node_modules/.bin/electron-angular-toolkit prepare
Using the node/electron api is quite easy, simply import the package you want to use, the electron-angular-toolkit provides a webpack-config which prevents webpack from trying to bundle those native modules
import * as os from 'os';
import * as electron from 'electron';
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = `app works on ${os.platform()} with electron ${electron.remote.process.versions.electron}!`;
}
The command
node_modules/.bin/electron-angular-toolkit build
will use the ng build command to bundle the application with webpack. A new bundle will be created each time you'll change your sourcecode. Now you can use
electron .
to launch the application.
Using the build command with the -w option, will create a new build each time your sourcecode changes.
The command
node_modules/.bin/electron-angular-toolkit publish
will create a dist folder inside your project, which will contain the stand-alone-application and a setup file. Before publishing it is required to set the following fields in your package.json:
Some modules have to run in the node js process, to prevent them from getting bundled into the webpack bundle you can add them to your package.json:
{
...,
"nativeModules": [
"decompress"
],
....
}
FAQs
A tool which helps to build electron applications with angular2
The npm package electron-angular-toolkit receives a total of 2 weekly downloads. As such, electron-angular-toolkit popularity was classified as not popular.
We found that electron-angular-toolkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.