A github template for your cordova and electron projects
February 12, 2020Each time I need to do a little personal android project (with a light angularjs),
I have to remember how to configure android environement, cordova packages, etc.
And recently, I need to generate an electron app.
However, cordova and electron use static html rendering logic: how to make it easier?
Using docker
I created a template repository on github: electron-docker-project, which handles android and electron build, and can serve html files using nginx (because modern browsers deny ajax call on local environment).
It’s really simple to use, after you based your repository on this template:
Install
$ git clone git@github.com:gpenverne/electron-docker-project.git
$ cd electron-docker-project
$ make build # Build the docker image
$ make install # Install dependencies
Run - electron gui
$ make gui # Launch the electron gui
Generate an android APK (cordova)
$ make android # Generate the android folders
$ make package # Build android apk (and electron packages!)
Serve static html ui (nginx)
$ make serve-html # Will helpfull to dev
This docker image embed electron and android cordova dependencies:
Now, you just have to edit the config.xml file to set the android app’s name, et voilà!
You May Also Enjoy
Multiplix - an angularjs multiplication game for children
I know that angularjs is outdated, but I find it’s a fast way to do simple projects. For example, multiplix :) Mutiplix is a little (and simple) game for...
Trello board to ReactAdmin frontend
Trello is cool to manage lists. However, Cards are a bit ugly, and not designed to be shown as reactAdmin pretty does.Idea: show a frontend reactadmin, u...
Manage your jekyll blog as a cms with Forestry.io
Did you know that gkdv.net uses jekyll as blog engine? Jekyll is a tool written in ruby to generate static html pages from markdown files. And github pag...
How to totally remove a too big file from your github repository
Oops, you added a too big file on your github repository, and… no way to totally remove it from your history.Oh, wait, there is a workarround, thanks to ...
When you click on links to various merchants on this site and make a purchase,
this can result in this site earning a commission.
Affiliate programs and affiliations include, but are not limited to,
the eBay Partner Network and Amazon.