This is a boilerplate which can build to Android, iOS, Windows, Mac, and Web by utilizing WebPack, Cordova, and Electron. Each platform offers a dev
deployment with hot-reloads and dev-tools/inspection enabled for easy development, and incremental deployment steps leading up to the release
step which builds a complete deployment package ready for release.
There are 4 folders under the src
directory corresponding to the 3 platforms (cordova
, electron
, web
) as well as a single app
directory. The platform directories are meant to house your platform specific code such as any initializers or overrides specific to the platform. The app
directory holds the common application code (hopefully most of your code).
- Download and install the platform SDKs for the platforms you are looking to develop for
- Download or clone this repository
npm install
- Check the VS Code extensions tab for recommended extensions to aid in development
- Run entire development environment in a Docker instance or WSL using Remote Development extension.
# performs dependency analysis on webpack bundle
npm run analyze
# all platform specific commands follow this structure
npm run ${platform}:${deployment}
# example of running android in dev deployment
npm run android:dev
android
ios
web
windows
mac
dev
- Runs on target platform with hot-reloads and full dev-tools enabledrun
- Runs on target platform as a static build with full dev-tools enabledstage
- Runs on target platform with release settings and dev-tools disabledrelease
- Builds a complete release version for target platformpublish
- (windows
only) Builds a release version and then publishes updates
This boilerplate is very simple and is intended to inspire developers. The webpack.js
file is where most of the "magic" happens and it is also the most difficult to understand part of this project. I have contemplated splitting it to make it easier to digest and have thus far not taken on this task. I am open to Pull Requests and will do my best to resolve Issues, but I make no guarantees. Thank you for taking a look. Leave a star if you have been inspired or referenced this project!
Copyright 2020 Zachary Cardoza under the MIT license.