Setting Up Your Local Environment/de: Difference between revisions
From Joomla! Documentation
Created page with "===Schritt für Schritt zur Installation der eigenen Umgebung===" |
Created page with "Klone die Paketquelle" |
||
| Line 16: | Line 16: | ||
===Schritt für Schritt zur Installation der eigenen Umgebung=== | ===Schritt für Schritt zur Installation der eigenen Umgebung=== | ||
# | # Klone die Paketquelle | ||
# run <tt>composer install</tt> from the root of the git repo (you can add --ignore-platform-reqs if you don't have the PHP-LDAP locally installed and you don't need it) | # run <tt>composer install</tt> from the root of the git repo (you can add --ignore-platform-reqs if you don't have the PHP-LDAP locally installed and you don't need it) | ||
# run <tt>npm install</tt> from the root of the git repo | # run <tt>npm install</tt> from the root of the git repo | ||
Revision as of 11:42, 19 August 2018
Handbuch für die Einrichtung von Joomla! 4 an die eigene Umgebung
Mit Joomla! 4 haben wir den Entwicklungsprozess verändert, es ist nicht länger möglich, die Paketquellen zu klonen und damit eine verwendbare Joomla! Installation zu erhalten. Wir richten uns hier an die besten Erfahrungen und haben einen Bauvorgang für das CMS eingefügt.
Schnellstartanweisungen
Es hängt von deinem Betriebssystem ab, was du alles tun musst, die Entwicklungsumgebung zu installieren. Wir können leider keine Dokumentation für alle Betriebssystem schreiben, daher solltest du deine bevorzugte Suchmaschine nach einer Anleitung fragen.
benötigte Werkzeuge
- PHP - im Wesentlichen dasselbe wie beim Betreiben einer Joomla! Seite, allerdings brauchst du eine spezielle Version, die PHP CLI (Kommandozeileneingabe) (beachte auch die Seite Einrichten eines LAMPP Servers für die PHP Entwicklung)
- Composer - um die Abhängigkeiten von Joomla!s PHP zu verwalten - Hilfe bei der Installation von Composer bietet die Dokumentation auf https://getcomposer.org/doc/00-intro.md
- Node.js - um Joomla!s JavaScript und SASS Dateien zu kompilieren - Hilfe bei der Installation von Node.js bieten die Anweisungen die auf https://nodejs.org/en/ erhältlich sind.
- Git - für die Versionsverwaltung
Schritt für Schritt zur Installation der eigenen Umgebung
- Klone die Paketquelle
- run composer install from the root of the git repo (you can add --ignore-platform-reqs if you don't have the PHP-LDAP locally installed and you don't need it)
- run npm install from the root of the git repo
The a bit longer start guide
Joomla is not different to many other web tools these days. It has a large PHP part and it has more and more JavaScript code. While PHP coding doesn't need so much preparation, JavaScript needs a lot tooling around. The main reason is that nobody writes code in a way that every browser understands, so the code needs transpiling from e.g. ES6 to a compatible version of JavaScript. The same is true for CSS, for Joomla we are using SASS and this will be converted to native CSS so that any browser understands it. As downside setting up a dev environment is a bit more complicated but the tooling make coding also more convenient. Thanks to watchers and browser auto reload you can see your change in real time.
PHP
It should be enough to run composer install as this will install PHP dependencies saved in the composer.lock file. You can do this as many times as you like, it will only install new packages when the composer.lock file is changed. Don't run composer update as this will update all packages to newer versions and update the composer.lock file.
Note: You may need to run composer install with the --ignore-platform-reqs option to ignore platform requirements specified in Composer, i.e. if you do not have PHP's LDAP extension installed.
Node/npm scripts
Node.js comes with a package manager called NPM (in some way the same as Composer). NPM has a run command and we have prepared some scripts to make your life easier. You have to run the commands for the root of the repository.
npm run build:css
It will compile SASS files to CSS and also create the minified files.
npm run build:js
It will compile and transpile the JavaScript files to the correct format and create minified files
npm run watch:css
This is the same as the build:css command but will watch for changes and automatically build updated files.
npm run watch:js
This is the same as the build:js command but will watch for changes and automatically build updated files.
npm run lint:js
This will make a syntax check on JavaScript files.
npm run test
This will run other JavaScript testing suite.