- Each feature must be developed in a plugin.
- Plugins need to follow our naming convention:
- Name: FD Blabla Lala
- Plugin slug: fd-blabla-lala
- kebab-case
- Plugin root file: fd-blabla-lala.php
- kebab-case
- Author: FUNKE Digital GmbH (Heiko Mamerow, Alexander Merz), Patrick Schinkel, Christian Storm,
- Always FUNKE first; external developers second.
- The names are sorted alphabetically by surname.
- Namespace: Fd_Blabla_Lala;
- Capitalized_Snake_Case
- Use same namespace inside the plugin.
- No PHPCS errors are allowed. (Warnings are still ok.)
- If the plugin is developed with build process, then the package.json with the build script and package dependencies needs to be included.
Workflow
We bring new features with plugins to our website. We never touch the themes nor external plugins. We always rely on our own self-hosted plugins.
Development with submodules
npm scripts
Install the dependencies with npm install:
- in the root folder
- in the
plugins/fd-newspack-extensionfolder - in all other plugin folders you want to work on
Automatic browser reload after file change
This is a little helper for development. It watches for file changes and reloads the browser automatically.
- Configure browser-sync-config.js for your needs:
proxyadd the URL of your local development domain e.g.https://4players-fdpub-de-3.fdpub.vipdev.lndo.site
- Start the dev-env with
vip dev-env start --slug=fdpub - Run
npm run startThis will also start the server and the watcher. - Open your browser at
https://localhost:3000
Pro tip: If all your devices are in the same proper wifi network environment, you can also open the localhost address on your mobile. If you scroll in one device it will also scroll in the other device. Unfortunately the office wifi is not allowing this. ;-(
IntelliJ IDEA scripts
In the .run folder are some helper scripts for IntelliJ IDEA.
Got to Run -> Run and click on the script you want.
The script names are self-explaining:
vip dev-env startstarts the local development environmentvip dev-env syncsyncs from fdpub to localvip dev-env logsshows the logs of the local development environment in your terminal
