JSPM

  • Created
  • Published
  • Downloads 7510
  • Score
    100M100P100Q122432F
  • License Apache-2.0

Electron Plugin for Nx

Package Exports

  • nx-electron

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nx-electron) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Nx Electron

Electron builders and schematics for Nrwl Nx platform.

licence npm version Dependencies status



NOTE: This repository is still in alpha.

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.
  • Coming Soon: Packaging, making, auto-updates, distributing and more...

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@latest

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.

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.
  • Run nx test <electron-app-name> to test your application.
  • Run nx e2e <electron-app-name-e2e> to run e2e tests for your 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.



Author: Benny Megidish.