1.0.26 ⢠Published 11 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
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