npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@swirl/electron-builder

v1.1.0

Published

This module contains a builder that supports building Angular applications targeted for electron. Specifically, this electron builder sets the webpack config's `target` option to `electron-renderer`. With minimal changes to your project's configuration yo

Downloads

3

Readme

Angular Electron Builder

This module contains a builder that supports building Angular applications targeted for electron. Specifically, this electron builder sets the webpack config's target option to electron-renderer. With minimal changes to your project's configuration you can use native node modules from within Angular applications that run using Electron.

Installation

Follow these steps to setup an Angular application using this builder.

1. Create an Angular project

Create an Angular project by running ng create. You must use Angular CLI 6 or above.

2. Clone this repository as a submodule

Clone this repository as a submodule by running:

git submodule init
git submodule add [email protected]:starlight-public/electron-builder.git electron-builder

3. Update your Angular configuration to use this builder

Edit your angular.json file, at the root of your project, and change the builder attribute on the project architect build entry. Change the value of builder to "builder": "./electron-builder:electron". Your config file should look something like this:

"projects": {
  "app-name": {
    "architect": {
      "build": {
        "builder": "./electron-builder:electron",
	    ...

4. Update your app's TypeScript config to resolve node modules

Edit your application's TypeScript config at src/tsconfig.app.json and delete the empty types array if there is one in the compilerConfig object.

5. Install electron

Run npm install --save electron

6. Configure the application to load using relative URLs

Open the src/index.html file and change the <base href="/"> tag to <base href="./">

7. Setup the Electron entry point

Create a file named main.js (or whatever you want really) and set it up to open an Electron browser window and load the index.html file in the dist folder. For an example you can look at the main.js file in this repository (you can use this script as is but make sure to change the app name to match the name of your app)

Then edit your package.json file and set the main attribute to the path to your main.js file. If main.js is in the root of your project then set "main": "main.js".

Building & Running your app

To build your app run ng build, ng build --watch, or ng build --prod just like you normally would.

To start Electron run ./node_modules/.bin/electron . from the root of your project.