1.0.26 • Published 11 months ago

angular-to-electron v1.0.26

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Angular to Electron CLI Tool

A command-line tool to convert Angular applications into Electron desktop applications with cross-platform support.

Features

Core Features

  • šŸ”„ One-command Angular to Electron conversion
  • šŸ–„ļø Cross-platform build support (macOS, Windows, Linux)
  • āœ… Automatic project structure validation
  • šŸ“¦ Automated dependency installation
  • āš™ļø Platform-specific build configurations

Technical Features

  • Automatic Electron main process configuration
  • IPC communication setup between Angular and Electron
  • Proper window management setup
  • Development and production build configurations
  • Cross-platform packaging setup
  • Hot-reload support in development

Installation

npm install -g angular-to-electron

Usage

Basic Usage

angular-to-electron /path/to/angular-app

With Platform Specification

angular-to-electron /path/to/angular-app --platforms macos,windows,linux

Options

Requirements

  • Node.js 14+
  • npm 6+
  • Angular project (version 12+)
  • Git (for development)

Project Structure After Conversion

your-angular-app/
ā”œā”€ā”€ src/
│   └── ... (Angular source files)
ā”œā”€ā”€ main.js             # Electron main process file
ā”œā”€ā”€ preload.js          # Electron preload script
ā”œā”€ā”€ electron-builder.json   # Electron build configuration
└── package.json        # Updated with Electron scripts

Available Scripts After Conversion

# Run in development mode
npm run electron:serve

# Build and run
npm run electron:build

# Package for distribution
npm run electron:package

Development Setup

  1. Clone the repository:
git clone https://github.com/yourusername/angular-to-electron.git
cd angular-to-electron
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Link the package locally:
npm link

Building for Distribution

The tool configures your Angular app with electron-builder. After conversion, you can build your app for different platforms:

macOS

npm run electron:package -- --mac

Windows

npm run electron:package -- --win

Linux

npm run electron:package -- --linux

Troubleshooting

Common Issues

  1. Electron Installation Failed

    • Ensure you have proper network connectivity
    • Try running with admin privileges
  2. Build Errors

    • Make sure your Angular app builds successfully before conversion
    • Check if all dependencies are properly installed
  3. Packaging Errors

    • Ensure you have the necessary platform-specific requirements installed
    • For Windows builds on macOS/Linux, wine is required
    • For macOS builds, XCode is required
  4. Deprecation Warnings

    • You may see deprecation warnings during installation about packages like @npmcli/move-file, npmlog, etc.
    • These warnings are from Electron's dependencies and can be safely ignored
    • Your application will still work correctly despite these warnings

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT

1.0.26

11 months ago

1.0.25

11 months ago

1.0.24

11 months ago

1.0.23

11 months ago

1.0.22

11 months ago

1.0.21

11 months ago

1.0.20

11 months ago

1.0.19

11 months ago

1.0.18

11 months ago

1.0.17

11 months ago

1.0.16

11 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.13

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago