1.0.26 ⢠Published 7 months ago
angular-to-electron v1.0.26
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
--platforms, -p
: Target platforms (comma-separated) default: "macos,windows"--help, -h
: Show help information
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
- Clone the repository:
git clone https://github.com/yourusername/angular-to-electron.git
cd angular-to-electron
- Install dependencies:
npm install
- Build the project:
npm run build
- 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
Electron Installation Failed
- Ensure you have proper network connectivity
- Try running with admin privileges
Build Errors
- Make sure your Angular app builds successfully before conversion
- Check if all dependencies are properly installed
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
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
- You may see deprecation warnings during installation about packages like
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - 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