Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • feature/migrate-cordova-13
  • feat/improve-network-scan
  • feat/force-migration-check
  • develop
  • feature/encrypted_comment
  • feature/android_api_19
  • gitlab_migration_1
  • rml8
  • v1.7.14
  • v1.7.13
  • v1.7.12
  • v1.7.11
  • v1.7.10
  • v1.7.9
  • v1.7.8
  • v1.7.7
  • v1.7.6
  • v1.7.5
  • v1.7.4
  • v1.7.3
  • v1.7.2
  • v1.7.1
  • v1.7.0
  • v1.7.0-rc2
  • v1.7.0-rc1
  • v1.6.12
  • v1.6.11
  • v1.6.10
29 results

development_guide.md

Blame
  • Development Guide

    In a post-it

    # Install NodeJS v12
    nvm use 12
    npm install -g yarn 
    
    # Clone and compile from source
    git clone git@git.duniter.org:clients/cesium-grp/cesium.git
    cd cesium
    yarn
    
    # Run the App !
    yarn run start

    Step by step

    Prerequisite

    To build Cesium, you will have to:

    1. Installing build tools:

         sudo apt-get install git wget curl unzip build-essential software-properties-common ruby ruby-dev ruby-ffi gcc make
    2. Installing node.js v12 :

    • 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 12
    1. Installing node build tools, as global dependencies:
         npm install -g yarn gulp cordova@10.0.0 @ionic/cli web-ext

    Get the source code and dependencies

    1. Getting the source code:
       git clone git@git.duniter.org:clients/cesium-grp/cesium.git
    1. Install project dependencies:

         cd cesium
         yarn
    2. 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 and platforms/ios.

      As a reminder: check that your command line is well configured:

      • You must place yourself in the directory of the application: cd cesium
      • and working with NodeJs v12: nvm use 12 (please check using the command node --version)

    Prepare configuration file

    Configure Cesium default settings :

    1. Add your environment config into app/config.json

    2. 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:

    You may also use Docker image to simplify this task;

    Time to code !

    Pull request

    For each pull request, please create an 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.