Skip to content
Klaus edited this page Jun 12, 2019 · 15 revisions

Setup

Get code

Please execute the following commands to get a copy of the code:

Core

git clone https://github.com/jsxc/jsxc.git

Apps (Nextcloud, Ilias, SOGo, ...; just the ones you need)

git clone https://github.com/nextcloud/jsxc.nextcloud.git
# and/or
git clone https://github.com/jsxc/jsxc.sogo.git
# and/or
git clone https://github.com/jsxc/jsxc.ilias.git

Install npm and grunt

We use npm and grunt to concatenate, convert, and validate our source files.

These build steps have been tested on Ubuntu 16.04 LTS and Ubuntu 17.04.

sudo apt install python-software-properties nodejs nodejs-legacy npm ruby
sudo npm install -g grunt bower
sudo gem install scss_lint	

To build the project, just run make in its top-level directory.

To prevent syntax errors and bad code style, install our git pre-commit hook:

# Core:
cd jsxc
cp pre-commit .git/hooks/

# Apps
cd jsxc.APPNAME
cp js/jsxc/pre-commit .git/modules/js/jsxc/hooks/

and then run composer install.

Now you are ready for development.

Workflow

  • run grunt in jsxc/ (and jsxc.APPNAME/)
  • make your modifications in src/ and scss/
  • check your results on example/dev.html (maybe you want to enable debugging)
  • git add ...
  • git commit (should run our pre-commit hook)
  • git push

Notes

Grunt commands

All commands with a star are also available in every app.

  • grunt* builds a developer build into dev/ and watches for changes
  • grunt build* builds a developer build into dev/
  • grunt build:prerelease* builds a pre-release into build/ (no changelog entry required and does not update documentation)
  • grunt build:release* builds a release into build/
  • grunt pre-commit Validates code (should be run as pre-commit hook)

Core Structure

  • build/ Pre- and stable builds go here. Never change something by hand
  • dev/ Developer builds go here.
  • doc/ Documentation
  • example/ Example use
  • img/ Images
  • lib/ Libraries
  • locales/ Translations
  • scss/ Sass files
  • sound/ Sound files
  • src/ Our source code

Debugging

Open your Javascript console (e.g. ctrl+shift+I) and enter jsxc.storage.setItem('debug', true) to obtain debug messages.

Libaries

Libaries

Events

Events

Variables

Variables

Locales

We use webtranslateit.com to organize our translations and wti to synchronise those.

Clone this wiki locally