1.0.26 • Published 7 months ago

angular-to-electron v1.0.26

Weekly downloads
-
License
MIT
Repository
github
Last release
7 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

7 months ago

1.0.25

7 months ago

1.0.24

7 months ago

1.0.23

7 months ago

1.0.22

7 months ago

1.0.21

7 months ago

1.0.20

7 months ago

1.0.19

7 months ago

1.0.18

7 months ago

1.0.17

7 months ago

1.0.16

7 months ago

1.0.15

7 months ago

1.0.14

7 months ago

1.0.13

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago