{"id":13406557,"url":"https://github.com/bennymeg/nx-electron","last_synced_at":"2025-05-14T17:05:40.356Z","repository":{"id":38711685,"uuid":"218020573","full_name":"bennymeg/nx-electron","owner":"bennymeg","description":"Electron schematics for nrwl nx platform","archived":false,"fork":false,"pushed_at":"2025-04-29T07:10:59.000Z","size":5082,"stargazers_count":355,"open_issues_count":16,"forks_count":90,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-14T17:04:54.600Z","etag":null,"topics":["cross-platform","electron","monorepo","ngx","nx","schematics"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bennymeg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"bennymeg","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2019-10-28T10:23:09.000Z","updated_at":"2025-05-11T12:07:01.000Z","dependencies_parsed_at":"2024-03-07T13:58:36.611Z","dependency_job_id":"1ffbd5f4-2225-49c9-9450-6d3b82c94a34","html_url":"https://github.com/bennymeg/nx-electron","commit_stats":{"total_commits":434,"total_committers":26,"mean_commits":"16.692307692307693","dds":0.2603686635944701,"last_synced_commit":"2d3955d7fe7e2a5552025f4f898987052272450c"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennymeg%2Fnx-electron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennymeg%2Fnx-electron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennymeg%2Fnx-electron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennymeg%2Fnx-electron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bennymeg","download_url":"https://codeload.github.com/bennymeg/nx-electron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254190396,"owners_count":22029632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross-platform","electron","monorepo","ngx","nx","schematics"],"created_at":"2024-07-30T19:02:33.545Z","updated_at":"2025-05-14T17:05:40.336Z","avatar_url":"https://github.com/bennymeg.png","language":"TypeScript","funding_links":["https://github.com/sponsors/bennymeg"],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/bennymeg/nx-electron/master/nx-electron.png\" width=\"240\"\u003e\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# Nx Electron\n\nElectron builders and schematics for Nrwl Nx platform.\n\n[![License](https://img.shields.io/github/license/bennymeg/nx-electron.svg?color=40bb12)](https://github.com/bennymeg/nx-electron/blob/master/LICENSE)\n[![NPM Version](https://img.shields.io/npm/v/nx-electron.svg)](https://www.npmjs.com/package/nx-electron)\n[![Downloads](https://img.shields.io/badge/downloads-750k+-respect)](https://npm-stat.com/charts.html?package=nx-electron\u0026from=2019-11-01)\n[![Sponsor](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color=%23fe8e86)](https://github.com/sponsors/bennymeg)\n[![Star this repo](https://img.shields.io/github/stars/bennymeg/nx-electron?style=social)](https://github.com/bennymeg/nx-electron)\n\n\n\n\u003c/div\u003e\n\n\u003chr\u003e\u003c/br\u003e\n\n# Features\n\nNx Electron provides a set of power ups on [Nx](https://nx.dev) for developing cross platform desktop apps using [Electron](https://electronjs.org/).\n\n- **Schematics**: Provides schematics for developing cross platform apps in a mono repo environment.\n- **Typescript**: Uses Typescript to help reduce errors, and create more structured code.\n- **Obfuscation**: Since Electron are used on the client machines, nx-electron obfuscates you code (and only it).\n- **Minimization**: Electron apps tend to be quite large, hence we use webpack to bundle, and minimize to code.\n- **Live Update**: Provides continuous live reload for your backend code.\n- **Event Templates**: Provides templates for common events like squirrel setup events, auto update events and IPC events.\n- **Packaging**: Packages your frontend and backend webpack bundles into single electron package.\n- **Making**: Makes your frontend and backend webpack bundles into single executable.\n\n# Compatibility\n\nThis repository follows the semantic versioning rules while adhering to Nx and Angular versioning scheme.\nMake sure that nx-electron major version matching Nx major version.\nI.e. version 19.x of nx-electron will be compatible with version 19.y of Nx. \n\n# Getting Started\n\n## Prerequisite\n\nThis module is based on Nx, you will need to [set up an Nx workspace](https://nx.dev/web/getting-started/getting-started) before you can use nx-electron.\n\n```bash\nnpx create-nx-workspace@20\n```\n\nMake sure to select Integrated monorepo as a project style, and Webpack as a bundler.\nYou should also create a frontend project in you workspace (in any nx supported framework you like) for you electron app.\n\n## Installation\n\n```bash\nnpm install -D nx-electron\n```\n\n## Creating Nx Electron Application\n\n```bash\nnx g nx-electron:app \u003celectron-app-name\u003e --frontendProject=\u003cfrontend-app-name\u003e\n```\n\n**NOTE:** You should add a frontend project to you workspace prior to invoking this command.\n\n**NOTE:** On certain frontend platforms (such as Angular, React, etc...) it is important to [change the baseHref field to \"./\"](https://github.com/dmatora/nx-electron-boilerplate/commit/b70da7a2ce730c7e2af7f4c1d69f30212eabfeb4), and use the hash strategy on the router in order for it to work well with electron. Further details can be found [here](https://github.com/bennymeg/nx-electron/issues/18#issuecomment-616982776).\n\n## Building Nx Electron Application\n\n- Run `nx build \u003celectron-app-name\u003e` to build your application.\n\n## Serving Nx Electron Application\n\n- Run `nx serve \u003celectron-app-name\u003e` to serve your application.\n\n## Packaging Nx Electron Application\n\n- Run `nx run \u003celectron-app-name\u003e:package [--options]` to package your application.\n- Or `nx run \u003celectron-app-name\u003e:make --prepackgeOnly` to package your application.\n\nThe options that can be passed are described [here](https://github.com/bennymeg/nx-electron/blob/master/packages/nx-electron/src/validation/maker.schema.json).\n\n## Making Nx Electron Application\n\n- Run `nx run \u003celectron-app-name\u003e:make [--options]` to make your application.\n\nThe options that can be passed are described [here](https://github.com/bennymeg/nx-electron/blob/master/packages/nx-electron/src/validation/maker.schema.json).\n\n## Configuring static packaging / making options\n\nIt is possible to configure all the packaging / making [options](https://www.electron.build/configuration/configuration) in _`.\\apps\\\u003celectron-app-name\u003e\\src\\app\\options\\maker.options.json`_. For more information [read this article](https://github.com/bennymeg/nx-electron/blob/master/docs/packaging.md).\n**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.\n\n## Migrating Nx Electron Application\n\nTo migrate automatically run `ng update nx-electron@\u003cversion\u003e`.\nYou can find detailed information in the following [migration guides](https://github.com/bennymeg/nx-electron/blob/master/docs/migration/).\n\n## Testing Nx Electron Application\n\n- Run `nx test \u003celectron-app-name\u003e` to test your application.\n\n## Debugging Nx Electron Application\n\n- Follow [this instructions](https://github.com/bennymeg/nx-electron/blob/master/docs/debugging.md) in order to configure the debugger your IDE.\n\n## Minimal Project Structure\n\nRegardless of what framework you chose, the resulting file tree will look like this:\n\n```treeview\n\u003cworkspace name\u003e/\n├── apps/\n│   ├── electron-app-name/\n│   ├── frontend-app-name/\n│   └── frontend-app-name-e2e/\n├── libs/\n├── tools/\n├── nx.json\n├── package.json\n├── tsconfig.json\n└── tslint.json\n```\n\n\u003c!-- ## Documentation ##\n- 👨🏼‍💻 [API](https://github.com/bennymeg/nx-electron/blob/master/docs/API.md),\n- 👩🏼‍🏫 [Examples](https://github.com/bennymeg/nx-electron/blob/master/docs/examples),\n- 📜 [Change log](https://github.com/bennymeg/nx-electron/blob/master/docs/CHANGELOG.md),\n- 🖋 [License](https://github.com/bennymeg/nx-electron/blob/master/LICENSE) --\u003e\n\n## Support\n\nIf you're having any problem, please [raise an issue](https://github.com/bennymeg/nx-electron/issues/new) on GitHub and we'll be happy to help.\n\n## Contribute\n\n- Follow [this instructions](https://github.com/bennymeg/nx-electron/blob/master/CONTRIBUTING.md) in order to learn how to contribute to this project.\n\n## Attribution\n\nThis project is highly inspired by (and dependent on) Nrwl [Nx](https://nx.dev) platform.\nUnder the hood, we use [Electron Builder](https://github.com/electron-userland/electron-builder) to package and make electron application executables.\n\n\u003c/br\u003e\u003chr\u003e\n**Author:** Benny Megidish.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbennymeg%2Fnx-electron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbennymeg%2Fnx-electron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbennymeg%2Fnx-electron/lists"}