项目作者: joaogarin

项目描述 :
Angular2 and Electron starter using webpack
高级语言: JavaScript
项目地址: git://github.com/joaogarin/angular-electron.git
创建时间: 2016-03-18T09:32:19Z
项目社区:https://github.com/joaogarin/angular-electron

开源协议:

下载


Angular 2 electron starterkit featuring webpack

DEPRECATED

This repo makes no longer much sense as I would recommend using Electron forge template for Angular instead. for that reason I am no longer maintaining this repository.

A working demo of electron with angular using Webpack, ngrx and material2

This is a starter of angular (2 and above) and electron. Its a demo of oauth with github using angular and electron. It uses ngrx to manage state. You should create a config file as following :

  1. {
  2. "github": {
  3. "client_id": "yourclientID",
  4. "client_secret": "yoursecretkey",
  5. "scopes": [
  6. "user:email",
  7. "notifications"
  8. ]
  9. }
  10. }

and place this file inside the “app” folder.Dont use this in production as for production you should have a safe server side URI and not have your secret key in the app folder.

When running it authenticates the user and goes to a page showing the username received from the authentication oauth workflow.

Run the example

  1. $ npm install
  2. $ npm run build
  3. $ npm run watch
  4. $ npm run electron

Packaging

The app has support for packaging using ‘electron-packager’

  1. $ npm run package

Will run the package for OSX. You can also provide additional options to the package command such as

  • —name : The package name
  • —all : Will packaget the application to all the platforms
  • —arch : Arches to be provided
  • —icon : The icon for the app

License

MIT