• 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:

  1. in the root folder
  2. in the plugins/fd-newspack-extension folder
  3. 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.

  1. Configure browser-sync-config.js for your needs:
    • proxy add the URL of your local development domain e.g. https://4players-fdpub-de-3.fdpub.vipdev.lndo.site
  2. Start the dev-env with vip dev-env start --slug=fdpub
  3. Run npm run start This will also start the server and the watcher.
  4. 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 start starts the local development environment
  • vip dev-env sync syncs from fdpub to local
  • vip dev-env logs shows the logs of the local development environment in your terminal