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

@ericwooley/nx-electron

v11.0.0-beta.1

Published

Electron Plugin for Nx

Downloads

3

Readme

Nx Electron

Electron builders and schematics for Nrwl Nx platform.

licence npm version Dependencies status Downloads

Features

Nx Electron provides a set of power ups on Nx for developing cross platform desktop apps using Electron.

  • Schematics: Provides schematics for developing cross platform apps in a mono repo environment.
  • Typescript: Uses Typescript to help reduce errors, and create more structured code.
  • Obfuscation: Since Electron are used on the client machines, nx-electron obfuscates you code (and only it).
  • Minimization: Electron apps tend to be quite large, hence we use webpack to bundle, and minimize to code.
  • Live Update: Provides continuos live reload for your backend code.
  • Event Templates: Provides templates for common events like squirrel setup events, auto update events and IPC events.
  • Packaging: Packages your frontend and backend webpack bundles into single electron package.
  • Making: Makes your frontend and backend webpack bundles into single executable. 🆕

Getting Started

Prerequisite

This module is based on Nx, you will need to set up an Nx workspace before you can use nx-electron.

npx create-nx-workspace@10

You should also create a frontend project in you workspace (in any nx supported framework you like) for you electron app.

Installation

npm install -D nx-electron

Creating Electron Application

nx g nx-electron:app <electron-app-name> --frontendProject=<frontend-app-name>

NOTE: You should add a frontend project to you workspace prior to invoking this command.

NOTE: On certain frontend platforms (such as Angular, React, etc...) it is important to change the baseHref field to "./", and use the hash strategy on the router in order for it to work well with electron. Further details can be found here.

Building Electron Application

  • Run nx build <electron-app-name> to build your application.

Serving Electron Application

  • Run nx serve <electron-app-name> to serve your application.

Packaging Electron Application

  • Run nx run <electron-app-name>:package [--options] to package your application.
  • Or nx run <electron-app-name>:make --prepackgeOnly to package your application.

The options that can be passed are described here.

Making Electron Application

  • Run nx run <electron-app-name>:make [--options] to make your application.

The options that can be passed are described here.

Configuring static packaging / making options

It is possible to configure all the packaging / making options in .\apps\<electron-app-name>\src\app\options\maker.options.json. For more information read this article. Notice: the option you define at this file will override the options you pass manually via the command line or choose via the angular console.

Migrating Electron Application

To migrate automaticlly run ng update nx-electron@<version>. You can find detailed information in the following articles:

Testing Electron Application

  • Run nx test <electron-app-name> to test your application.

Debugging Electron Application

Minimal Project Structure

Regardless of what framework you chose, the resulting file tree will look like this:

<workspace name>/
├── apps/
│   ├── electron-app-name/
│   ├── frontend-app-name/
│   └── frontend-app-name-e2e/
├── libs/
├── tools/
├── nx.json
├── package.json
├── tsconfig.json
└── tslint.json

Support

If you're having any problem, please raise an issue on GitHub and we'll be happy to help.

Contribute

Before submitting a pull request, please make sure that you include tests and lints runs without any warnings.

Versioning

This repository follows the semantic versioning rules while adhering to Nx and Angular version scheme.

Attribution

This project is highly inspired by (and dependent on) Nrwl Nx platform. Under the hood, we use Electron Packager to package the electron application and Electron Builder to make executables.

Author: Benny Megidish.