Skip to content

MehdiDonk/creativeeurope-reference

Repository files navigation

NextEuropa Subsite Starterkit

T                                    \`.    T
|    T     .--------------.___________) \   |    T
!    |     |//////////////|___________[ ]   !  T |
     !     `--------------'           ) (      | !
                                      '-'      !

This is a starting point for creating new websites for the NextEuropa platform of the European Commission.

Features

  • Support for NextEuropa 2.1.0 and later.
  • Easily test your code on the latest development branch of the NextEuropa platform to validate if your site will work on the next release.
  • Integrated support for Behat and PHP CodeSniffer.
  • Built-in support for Continuous Integration using ContinuousPHP.
  • Build your website in an automated way to get your entire team up and running fast!

Recent notable changes

  • 2015-12-22: The structure of the platform package that is being downloaded from ContinuousPHP has changed. The codebase now resides in the root folder instead of the build/ folder. The platform downloads should be much faster now.

Repository structure

1. Project configuration

The configuration of the project is managed in 3 build.properties files:

  1. build.properties.dist: This contains default configuration which is common for all NextEuropa projects. This file should never be edited.
  2. build.properties: This is the configuration for your project. In here you can override the default configuration with settings that are more suitable for your project. Some typical settings would be the site name, the install profile to use and the modules/features to enable after installation.
  3. build.properties.local: This contains configuration which is unique for the local development environment. In here you would place things like your database credentials and the development modules you would like to install. This file should never be committed.

2. Project code

  • Your custom modules, themes and custom PHP code go in the lib/ folder. The contents of this folder get symlinked into the Drupal website at sites/all/.
  • Any contrib modules, themes, libraries and patches you use should be put in the make file resources/site.make. Whenever the site is built these will be downloaded and copied into the Drupal website.
  • If you have any custom Composer dependencies, declare them in resources/composer.json and resources/composer.lock.

3. Drupal root

The Drupal site will be placed in the platform/ folder when it is built. Point your webserver here. This is also where you would execute your Drush commands. Your custom modules are symlinked from platform/sites/all/modules/custom/ to lib/modules/ so you can work in either location, whichever you find the most comfortable.

4. Behat tests

All Behat related files are located in the tests/ folder.

  • tests/behat.yml: The Behat configuration file. This file is regenerated automatically when the project is built and should never be edited or committed.
  • tests/behat.yml.dist: The template that is used for generating behat.yml. If you need to tweak the configuration of Behat then this is the place to do that.
  • tests/features/: Put your Behat test scenarios here.
  • tests/src/Context/: The home of custom Context classes.

5. Other files and folders

  • bin/: Contains command line executables for the various tools we use such as Behat, Drush, Phing, PHP CodeSniffer etc.
  • build/: Will contain the build intended for deployment to production. Use the build-dist Phing target to build it.
  • src/: Custom PHP code for the build system, such as project specific Phing tasks.
  • tmp/: A temporary folder where the platform tarball is downloaded and unpacked during the build process.
  • tmp/deploy-package.tar.gz: The platform tarball. This file is very large and will only be downloaded once. When a new build is started in the future the download will be skipped, unless this file is deleted manually.
  • vendor/: Composer dependencies and autoloader.

Getting started

This README is divided in different parts, please read the relevant section:

  1. Developer guide: Explains day-to-day development practices when working on a NextEuropa subsite.
  2. Starting a new project: This section explains how to set up a brand new project on the NextEuropa platform. These instructions need only to be followed once by the lead developer at the start of the project.
  3. Converting an existing project: If you already have a project that runs on NextEuropa and you want to start using Continuous Integration, check out this section.
  4. Merging upstream changes: How to merge the latest changes that have been made to the Subsite Starterkit in your own project.
  5. Contributing: How to contribute bugfixes and new features to the Subsite Starterkit.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published