Development

kubenav requires Node v8.6.0 or later, and NPM version 5.6.0 or later (which is usually automatically installed with the required version of Node).

If there is a previous installation of the Ionic CLI installed, it will need to be uninstalled due to a change in package name for ionic/cli:

npm uninstall -g ionic

If you have Node and NPM installed, install Ionic CLI:

npm install -g @ionic/cli

Besides Node, kubenav requires Go 1.14 or later and Go mobile, which can be installed using the following commands:

go get -u golang.org/x/mobile/cmd/gomobile
go install golang.org/x/mobile/cmd/gomobile
gomobile init

To build the Electron version of kubenav, install the go-astilectron-bundler:

go get -u github.com/asticode/go-astilectron-bundler/...
go install github.com/asticode/go-astilectron-bundler/astilectron-bundler

To build the iOS version of kubenav ensure that you have Xcode and CocoaPods installed. For the Android version you need the Android SDK, which can be installed via Android Studio and the NDK. Also ensure that the ANDROID_HOME and ANDROID_NDK_HOME environment variables are set.

Clone the repository, login to GitHub packages and install the required dependencies:

git clone git@github.com:kubenav/kubenav.git
cd kubenav

npm install

You must build the kubenav project at least once before running on any native platform:

ionic build

You may then build the relevant mobile platform you require

make bindings-android
make bindings-ios

To use kubenav in your browser you need to build and start the server. The server listening on port 14122:

make build-server && ./bin/server

Now you can start the app and open localhost:8100 in your browser:

ionic serve

Every time you perform a build (e.g. ionic build) that changes your web directory (default: build), you'll need to copy those changes down to your native projects:

npx cap sync

The native iOS and Android projects are opened in their standard IDEs (Xcode and Android Studio, respectively). Use the IDEs to run kubenav:

npx cap open ios
npx cap open android

You can also run the native iOS or Android app with live reloading:

ionic capacitor run android -l --address=0.0.0.0
ionic capacitor run ios -l --address=0.0.0.0

To build the Electron version of kubenav run make build-electron. The app can be found in the cmd/electron/output/<PLATFORM>-amd64 folder:

make build-electron