Creating Aquifer Projects

Jon Peck edited this page Sep 28, 2015 · 8 revisions

Creating Aquifer projects is very simple, as Aquifer ships with an easy-to-use but highly configurable scaffolding tool.

Using aquifer create

The Aquifer CLI has a create command. When this command is run, it will create a directory, and scaffold a drush make Drupal workflow in the folder. It takes one parameter, which should represent the machine name of your project. This command also allows you to pass in a config file that specifies how the project should be scaffolded.

  • aquifer create --help - returns helpful documentation.
  • aquifer create myWebsiteName - Creates a folder called myWebsiteName in the current working directory, and scaffolds a drush make Drupal site root.
  • aquifer create myWebsiteName --config_file /path/to/config.json - Creates a folder called myWebsiteName in the current working directory, and uses the config.json to scaffold a drush make Drupal site root.

Passing in a config file

As mentioned previously, aquifer create accepts a --config_file or -c flag that takes a path to a config JSON file.

When supplied, this JSON file will be used to scaffold the project. File and folder names will be created based on what is specified in the passed-in file, allowing one to have complete control over the source tree structure of the entire project. Here's an example config.json file:

{
  "name": "myCustomName",
  "paths": {
    "make": "drupal.make",
    "settings": "settings",
    "builds": "builds/",
    "themes": {
      "root": "themes/",
      "contrib": "themes/contrib",
      "custom": "themes/custom"
    },
    "modules": {
      "root": "modules",
      "contrib": "modules/contrib",
      "custom": "modules/custom",
      "features": "modules/features"
    }
  }
}

When the Aquifer project is created and scaffolded, these settings will be stored in an aquifer.json file. It should be noted that you should NOT change these values after initial scaffolding. Doing so will break various parts of the CLI, as it relies on this file to know how the project is structured.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.