-
Benoit Lavenier authoredBenoit Lavenier authored
Development Guide
Prerequisite
To build Cesium, you will have to:
-
Installing build tools:
sudo apt-get install git wget curl unzip build-essential software-properties-common ruby ruby-dev ruby-ffi gcc make
-
Installing node.js v10 :
-
First, install nvm (Node Version Manager) :
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
Alternatively, if you are using
fish shell
, there is a dedicated plugin. -
Then, reload your terminal (for instance by executing the command
bash
); -
Configure nvm to use the expected version: (WARNING: upper version will NOT work !)
nvm install 10
- Installing node build tools, as global dependencies:
npm install -g yarn gulp cordova @ionic/cli
Get the source code and dependencies
- Getting the source code:
git clone git@git.duniter.org:clients/cesium-grp/cesium.git
-
Install project dependencies:
cd cesium yarn
-
Installing Cordova plugins (required to build Android and iOS artifacts):
export JAVA_HOME=/path/to/jdk-8 export PATH=$JAVA_HOME/bin:$PATH ionic cordova prepare
This should create new directories
platforms/android
andplatforms/ios
.As a reminder: check that your command line is configured correctly:
- You must place yourself in the directory of the application:
cd cesium
- and working with NodeJs v10:
nvm use 10
(please check using the commandnode --version
)
- You must place yourself in the directory of the application:
Prepare Cesium default config
Configure Cesium default settings :
-
Add your environment config into
app/config.json
-
Update default configuration, using the command:
gulp config --env <your_env_name>
This will update a configuration file www/js/config.json
.
Compile and launch
To compile and launch Cesium, run :
yarn run start
or alternative: npm start
or ionic serve
The application should be running at localhost:8100!
Build artifacts
Cesium can be build:
- as an unhosted web applicationa;
- for Android;
- for iOS;
- as a Web extension for Mozilla Firefox or Chrome/Chomium;
-
as a Desktop application for Linux (
.deb
), Windows and MacOSx;
You may also use Docker image to simplify this task;
Time to code !
Pull request
For each pull request, please create a issue first.
Best practices for development
Cesium could be run on phone devices. Please read performance tips on AgularJS + Ionic before starting to contribute.
Read also Angular performance for large applicatoins.