With drush feature-export you can easily create a feature from a component. But is there a way to easily export ALL components into a feature? In the ui you can easily check all content types or all views. I tried drush fe newfeature views_view
but it only exports one view not all of them.
Add a comment
|
1 Answer
Hmm ... did you try drush's built in Help topics?
I am running drush --version
:
Drush Version : 6.2.0
The help output for features-export is:
drush help fe
Export a feature from your site into a module. If called with no arguments, display a list of available components. If called with a single argument, attempt to create a feature including the given component with the same name. The option '--destination=foo' may be used to specify the path (from Drupal root) where the feature should be created. The default destination is 'sites/all/modules'. The option '--version-set=foo' may be used to specify a version number for the feature or the option '--version-increment' may also to increment the feature's version number. Arguments: feature Feature name to export. components Patterns of components to include, see features-components for the format of patterns. Options: --destination Destination path (from Drupal root) of the exported feature. Defaults to 'sites/all/modules' --version-increment Increment the feature's version number. --version-set Specify a version number for the feature. Aliases: fe
And drush help fc
:
List feature components matching patterns. The listing may be limited to exported/not-exported components. A component pattern consists of a source, a colon and a component. Both source and component may be a full name (as in "dependencies"), a shorthand (for instance "dep") or a pattern (like "%denci%"). Shorthands are unique shortenings of a name. They will only match if exactly one option contains the shorthand. So in a standard installation, "dep" will work for dependencies, but "user" wont, as it matches both user_permission and user_role. Patterns uses * or % for matching multiple sources/components. Unlike shorthands, patterns must match the whole name, so "field:%article%" should be used to select all fields containing "article" (which could both be those on the node type article, as well as those fields named article). * and % are equivalent, but the latter doesn't have to be escaped in UNIX shells. Lastly, a pattern without a colon is interpreted as having ":%" appended, for easy listing of all components of a source. Arguments: patterns The features components type to list. Omit this argument to list all components. Options: --exported Show only components that have been exported. --not-exported Show only components that have not been exported. Aliases: fc
So you should be able to use wildcards like %
or *
to select all types of a component. Eg, drush fe newfeature views_*
. Your mileage may vary ...
-
That was it! Thanks, still new to drush but that will help me explore its capabilities. Thanks again!– ChadCommented Feb 14, 2014 at 5:27