Prepare a Module skeleton

Last updated on
17 January 2017

In the sub-sections of the guide after this one, we will be building different things. A custom page, block, entity, field, etc. But all the examples will start with a module folder and a .info.yml file. With those two things, you can see the module in Drupal 8's Extend administration page, or activate it directly with drush. So this sub-section will guide you through the process of starting the process by naming and placing the .info.yml that is the starting point for any new module you will create.

If you would like to clone the git repository of the example code contained in this section, you must have git installed and follow the instructions.

The code in this first section is in the 'skeleton' branch. To check it out, use the following command:

git checkout skeleton

The rest of the branches should line up with the following sub-sections of this guide, and are designed to dovetail into their fuller counterparts in the Examples For Developers module found here.