Git Product home page Git Product logo

electonic's Introduction

Electonic

Please note this repo is not under active development.

a boilerplate combining electron, ionic2 and cordova for creating truly cross platform apps using web technologies.

electronioniccordova

Please note that this is a current work in progress! I'm currently devoting my time to improving the electonic CLI (see branch CLI)

Setup

  1. Make sure you have ionic@beta installed globally with npm.
    --> npm install -g ionic@beta
  2. clone this repo git clone https://github.com/callodacity/electonic.git
  3. run npm install

Usage

Developing for mobile platforms

Use the ionic CLI as normal i.e. ionic serve, ionic build, ionic run, etc.

Developing for desktop platforms

Run the scripts inside package.json:

  • npm run dev will enable dev mode, using ionic's gulp watch process and automatically opening an electron app directed towards your development livereload server.
  • npm run test will only open your app in its current state. No live watching/reloading here.

Distribution and Packaging

Building with electron (desktop)

I recommend using electron-packager - it has great features and is quite stable.
electron-prebuilt and electron-packager are both included as devDependencies.

If you want to package your app run you can use these npm scripts:
--> Before you package your app your must run either npm run dev or npm run test at least once!!
--> Please note that these scripts will overwrite old packaged apps in the same directory

  • npm run pack:osx --> packages into .app for osx. Both Darwin and MAS.
  • npm run pack:win --> packages into .exe (ia32 and x64) for Windows.
  • npm run pack:nix --> packages into both ia32 and x64 for Linux.

If you plan to use your own parameters for electron-packager make sure the <sourcedir> is set to ./www/.

Building with ionic (mobile)

This repository is really just an ionic project with electron built into it. So if you're building for mobile follow ionic's or cordova's tutorials on that.

  • ionic build will build your app.
  • Remember to add desired platforms ionic platform add android.
  • Go here for more information on ionic build.

TODO

  • configure electron packaging (e.g., building into .exe, .app, etc.

  • attempt to find a fix for readline.js on windows systems (you won't be able to input into command prompt, just terminate with crtl+c)

  • remove unnecessary files from final packaged app

    • include only pertinent files of final app
    • exclude desktop files on mobile production apps and vice versa
  • Make an electonic CLI

    • Be able to choose desktop / mobile / all as production platforms
    • Make a wrapper for Ionic (for choosing TypeScript/JavaScript projects and their starter templates)
    • Be able to choose vanilla AngularJS / Ionic / no library
      • perhaps adding support for adding library of choice?
  • think of other improvements for this boilerplate

electonic's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.