Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"web/core": ["type:drupal-core"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/themes/contrib/{$name}": ["type:drupal-theme"]
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/commands/{$name}": ["type:drupal-drush"]
}
}
}
3 changes: 3 additions & 0 deletions drush/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The three subdirectories here hold project-specific commandfiles, site aliases, and configuration for Drush. These will all be included automatically when you use the ./dr wrapper script that should be in your project root directory. The dr script intentionally skips loading commands/aliases/config from the typical global locations in order to ensure that all team members have same Drush environment.

See http://packages.drush.org/ for a directory of Drush commands installable via Composer.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages.drush.org should probably be added to the "repositories" section too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, packages.drush.org is just query tool for packagist.org. So i'm thinking it does not need to be listed in 'repositories'.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, you are correct.

I also notice that packagist.drupal-composer.org (or, more accurately, the parser that builds component info from drupal.org projects) and packagist.org (which is to say, what everyone seems to be entering into their composer.json files) are both standardized on the type 'drupal-drush' now, which is good. For a while, some folks were using 'drush-extension', but that usage has thankfully fallen into disuse.

Empty file added drush/commands/.gitkeep
Empty file.
Empty file added drush/config/.gitkeep
Empty file.
Empty file added drush/site-aliases/.gitkeep
Empty file.
8 changes: 8 additions & 0 deletions scripts/composer/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ if [ ! -d web/sites/default/files ]
then
mkdir -m777 web/sites/default/files
fi

# Add wrapper script for launching drush with project specific config/aliases/commands.
if [ ! -d dr ]
then
echo "#!/usr/bin/env sh
vendor/bin/drush --local --alias-path=drush/site-aliases --config=drush/config --include=drush/commands $@" > dr
chmod +x dr
fi