Как экспортировать все компоненты функций с помощью drush?


С помощью функции drush-экспорта вы можете легко создать функцию из компонента. Но есть ли способ легко экспортировать ВСЕ компоненты в функцию? В пользовательском интерфейсе вы можете легко проверить все типы контента или все представления. Я попробовал drush fe newfeature views_view, но он экспортирует только одно представление, а не все из них.

Author: Chad, 2014-02-13

1 answers

Хм... вы пробовали встроенные разделы справки drush?

Я бегу drush --version: Drush Version : 6.2.0

Вывод справки для функций-экспорт: 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

И 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

Таким образом, вы должны иметь возможность использовать подстановочные знаки, такие как % или *, для выбора всех типов компонента. Например, drush fe newfeature views_*. Ваш пробег может отличаться...

 2
Author: tenken, 2014-02-14 00:04:40