This project written in Angular 2 can be used to write,
a) Web based applications,
b) Cordova applications for iOS, Android, Windows
c) Electron apps targeting Mac, Windows and Linux
.. and it can do so with 100% code reuse.
Just write the app once and run everywhere (yeah really!)
Here is a short 10 minute video that builds an app for Android/Windows/Web/iOS/Mac..etc. in .. yeah 10 minutes.
The idea being, write your angular2 app in the "www" folder and package it and run it everywhere.
Instructions:
- git clone https://github.com/maliksahil/ngXplat
- npm install && jspm init && jspm install (this will ask you to create a jspm.config.js - say yes)
- npm start .. and this will launch it in a browser.
npm start
cordova platform add android
npm run cordova
The package.json is rigged to run android, but you can easily target iOS etc. I have choosen android since it'll work on windows, mac and Linux
npm run electron:package
This will create an "out" directory where you can grab the binaries for mac/windows/linux
Feedback? reach me at www.winsmarts.com or @sahilmalik