Skip to content
Rebecca Brown edited this page Dec 1, 2022 · 22 revisions

Welcome to the oneclick-ionic-ui wiki!

Initial setup

This will help ensure a developer has all the npm packages necessary to create a new project or start a new project.

Currently the updated code is on branch ionic-update. This is temporary until it can be merged into develop.

Optional: Install NVM

STRONGLY RECOMMENDED!!

Ionic will not build with the newer versions of Node so using a version manager might be necessary so that you can have an older Node version available. Use nvm to switch to correct version before running any build or install commands. See below for Node versions required.

If you have multiple projects running varying versions of Node already, then installing a Node Version Manager maybe useful. See below for links:

Install NodeJs

Test if you already have NodeJs by running

node -v

At the time of writing you should have at least v14.15.4(current working version Node@18.12.1 as of 2022/11/30). If that doesn't return a result install NodeJS.

The current working version of Node (v18.x.x) will not work with Ionic 6! You will need to install v14.x.x

If you NodeJs is out of date then check the Install NVM Section for details on installing a version manager for Node.

Note that as of NodeJs version 0.6.2, npm comes bundled with NodeJs, so if you don't have npm installed, you are probably on a "too old" version of Node.

Install Ionic

Test if you already have Ionic by running

ionic -v

At the time of writing you should have at least 6.20.1(current version v6.20.4 as of 2022/11/30). If Ionic is out of date or not installed run: npm install -g @ionic/cli or sudo npm install -g @ionic/cli

Install Other Dependencies

Run npm install

Make sure you are currently using the correct version of Node in your command window.

This should auto-generate or auto-update the package-lock.json so if it doesn't do that, then check the log of your terminal.

Running the application

There are deploy scripts set up to make running or deploying the application easy. These scripts are individualized for each client that uses this UI. Here I will use the 211Ride client as the example client. Other clients include Hopelink. The main deploy folder has subfolders (one for each client).

For local development on your personal laptop, run the script from a command window after navigating to the desired client's configuration folder (for example deploy/211ride):

./211ride-local.sh

This "local" script will configure the application for a local environment (possibly a locally hosted backend API) and will automatically launch the command ionic serve to launch the application on a local web server.

Clone this wiki locally