electron-angular-boilerplate
electron-angular-boilerplate copied to clipboard
An Electron + AngularJS + Angular Material boilerplate with native menu and automated build using Electron-packager
Electron + AngularJS + Angular Material
For a TypeScript Version of the Boilerplate see the typescript branch
Clone and run for a quick way to get started with Electron + AngularJS + AngularMaterial.
A basic Electron application needs just these files:
index.html- A web page to render.main.js- Starts the app and creates a browser window to render HTML.package.json- Points to the app's main file and lists its details and dependencies.
You can learn more about each of these components within the Quick Start Guide.
The Angular App is located in the scripts/ folder.
This boilerplate includes:
AngularJS- For running the AngularJS AppAngular-Material,Angular-AriaandAngular-Animate- For a sexy look, for everyoneAngular-route- For a better life
You can learn more about AngularJS on the AngularJS Website.
Requirements
Electron is no longer a dev dependency and is expected to be installed globally:
npm install -g electron
To Use
To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:
# Clone this repository
$ git clone https://github.com/thomas-barthelemy/electron-angular-boilerplate
# Go into the repository
$ cd electron-angular-boilerplate
# Install dependencies and run the app
$ npm install && npm start
Learn more about Electron and its API in the documentation.
To build
To fully use this boilerplate you will need grunt (npm install grunt-cli),
from there you can use grunt build to package your Electron app using Electron Packager
which will:
- Clean any previous build
- Prepare a minimal App in the
/buildfolder (configurable in Gruntfile.js) - Find node_modules dependencies in your
index.htmland add them accordingly to thebuildfolder - Uglify the JS files in the
buildfolder - Package the App using
ASAR(configurable) - Create distribution package for all platforms (configurable) in the
distfolder