-
Notifications
You must be signed in to change notification settings - Fork 0
Development Environment
You will have to install a Linux Virtual Machine, because it is the Cozy's hosting and development environment.
The recommended environment is Ubuntu (or Debian) on a Virtualbox Virtual Machine.
- In order to install VM, you will have to desactivate Hyper-V mode/flag in Windows
- Hyper-V is a virtualisation mode specific to Windows conflictng with Virtualbox virtualisation mode
- This also means that Virtualbox and Docker are incompatible on Windows
- Install Virtualbox and Ubuntu (or Debian) following one of those tutos:
- Don't forget:
- To install Virtualbox Guest Additions to run the Ubuntu virtual machine in full-screen mode
- To define a shared folder between Windows and Ubuntu Virtual Machine to get access to your own files even if your VM is down.
- déclarer a partage folder
- mount -t vboxsf partage hote
- ou dans /etc/fstab : partage /home/jgilliot/hote vboxsf defaults 0 0
- After installation is done, don't forget to update your installation
sudo apt-get update
Nous reprenons ici l'environnement proposé par Cozy :
-
NodeJS 8+
-
Un gestionnaire de paquetages JS : Yarn ou npm qui est naturel pour Angular (Yarn et Angular sont néanmoins compatibles)
-
Un serveur pour tester les services développés installé sur Docker.
Le serveur cozy de test s'installe sur docker en une simple commande :
docker pull cozy/cozy-app-dev
Penser à lancer cette commande réguliérement pour avoir les derniéres mise à jour de cozy. Cette commande nécessite des droits particuliers. Utiliser sudo ou gérer les droits (voir documentation)
Some convenient IDE exist:
-
un bon éditeur atom installation Ubuntu
-
Un environnement de développement Angular : [Visual Studio Code] (https://code.visualstudio.com/) par exemple
-
il faut installer npm pour gérer la configuration de javascript (choisir la verssion LTS)
-
installation de Angular :
npm -g install @angular/cli
Save and share your development
- Thanks a shared folder, you can access your project from both sides : guest and virtual machines
- From one of those point, use a version control system. In Sedela project, we use github
on le lance par la commande décrite ici https://docs.cozy.io/en/dev/app/ avec répertoire dist et pas build
Here are some tricks about Linux or Javascript environment
- don't forget to update your installation from time to time:
sudo apt-get updatesudo apt-get upgrade - If you ever forget your password, you can reset it
- ne pas pleurer les yarn install et compléter par npm install
-
npm -iwill reinitialize npm