diff --git a/config/dist/chain/create-data.yml b/config/dist/chain/optional/create-data.yml similarity index 100% rename from config/dist/chain/create-data.yml rename to config/dist/chain/optional/create-data.yml diff --git a/config/dist/chain/form-sample.yml b/config/dist/chain/optional/form-sample.yml similarity index 100% rename from config/dist/chain/form-sample.yml rename to config/dist/chain/optional/form-sample.yml diff --git a/config/dist/chain/sample.yml b/config/dist/chain/optional/sample.yml similarity index 100% rename from config/dist/chain/sample.yml rename to config/dist/chain/optional/sample.yml diff --git a/config/dist/chain/site-install-placeholers-env.yml b/config/dist/chain/optional/site-install-placeholers-env.yml similarity index 100% rename from config/dist/chain/site-install-placeholers-env.yml rename to config/dist/chain/optional/site-install-placeholers-env.yml diff --git a/config/dist/chain/site-install-placeholers.yml b/config/dist/chain/optional/site-install-placeholers.yml similarity index 100% rename from config/dist/chain/site-install-placeholers.yml rename to config/dist/chain/optional/site-install-placeholers.yml diff --git a/config/dist/chain/site-install.yml b/config/dist/chain/optional/site-install.yml similarity index 100% rename from config/dist/chain/site-install.yml rename to config/dist/chain/optional/site-install.yml diff --git a/config/dist/chain/site-update.yml b/config/dist/chain/optional/site-update.yml similarity index 100% rename from config/dist/chain/site-update.yml rename to config/dist/chain/optional/site-update.yml diff --git a/config/dist/chain/update-command-data.yml b/config/dist/chain/optional/update-command-data.yml similarity index 68% rename from config/dist/chain/update-command-data.yml rename to config/dist/chain/optional/update-command-data.yml index ebc655b..9d33e31 100644 --- a/config/dist/chain/update-command-data.yml +++ b/config/dist/chain/optional/update-command-data.yml @@ -1,131 +1,136 @@ +# How to use +# update:command:data --directory="/path/to/drupal-project/" +command: + name: update:command:data + description: 'Update gitbook' commands: - command: settings:set arguments: - setting-name: language - setting-value: ca + name: language + value: ca - command: generate:doc:data options: file: '%{{data_path}}/ca.json' - command: settings:set arguments: - setting-name: language - setting-value: en + name: language + value: en - command: generate:doc:data options: file: '%{{data_path}}/en.json' - command: settings:set arguments: - setting-name: language - setting-value: es + name: language + value: es - command: generate:doc:data options: file: '%{{data_path}}/es.json' - command: settings:set arguments: - setting-name: language - setting-value: fr + name: language + value: fr - command: generate:doc:data options: file: '%{{data_path}}/fr.json' - command: settings:set arguments: - setting-name: language - setting-value: gu + name: language + value: gu - command: generate:doc:data options: file: '%{{data_path}}/gu.json' - command: settings:set arguments: - setting-name: language - setting-value: hi + name: language + value: hi - command: generate:doc:data options: file: '%{{data_path}}/hi.json' - command: settings:set arguments: - setting-name: language - setting-value: hu + name: language + value: hu - command: generate:doc:data options: file: '%{{data_path}}/hu.json' - command: settings:set arguments: - setting-name: language - setting-value: id + name: language + value: id - command: generate:doc:data options: file: '%{{data_path}}/id.json' - command: settings:set arguments: - setting-name: language - setting-value: ja + name: language + value: ja - command: generate:doc:data options: file: '%{{data_path}}/ja.json' - command: settings:set arguments: - setting-name: language - setting-value: ko + name: language + value: ko - command: generate:doc:data options: file: '%{{data_path}}/ko.json' - command: settings:set arguments: - setting-name: language - setting-value: mr + name: language + value: mr - command: generate:doc:data options: file: '%{{data_path}}/mr.json' - command: settings:set arguments: - setting-name: language - setting-value: pa + name: language + value: pa - command: generate:doc:data options: file: '%{{data_path}}/pa.json' - command: settings:set arguments: - setting-name: language - setting-value: pt_br + name: language + value: pt_br - command: generate:doc:data options: file: '%{{data_path}}/pt_br.json' - command: settings:set arguments: - setting-name: language - setting-value: ro + name: language + value: ro - command: generate:doc:data options: file: '%{{data_path}}/ro.json' - command: settings:set arguments: - setting-name: language - setting-value: ru + name: language + value: ru - command: generate:doc:data options: file: '%{{data_path}}/ru.json' - command: settings:set arguments: - setting-name: language - setting-value: tl + name: language + value: tl - command: generate:doc:data options: file: '%{{data_path}}/tl.json' - command: settings:set arguments: - setting-name: language - setting-value: vn + name: language + value: vn - command: generate:doc:data options: file: '%{{data_path}}/vn.json' - command: settings:set arguments: - setting-name: language - setting-value: zh_hans + name: language + value: zh_hans - command: generate:doc:data options: file: '%{{data_path}}/zh_hans.json' - command: settings:set arguments: - setting-name: language - setting-value: en + name: language + value: en diff --git a/config/dist/chain/optional/update-gitbook.yml b/config/dist/chain/optional/update-gitbook.yml new file mode 100644 index 0000000..b274f26 --- /dev/null +++ b/config/dist/chain/optional/update-gitbook.yml @@ -0,0 +1,80 @@ +# How to use +# update:gitbook --directory="/path/to/drupal-project/" +command: + name: update:gitbook + description: 'Update gitbook' +commands: + # - command: exec + # arguments: + # bin: composer require drupal/features + - command: 'module:install' + arguments: + module: + - rest + - taxonomy + - locale + - migrate + - simpletest + - features + - breakpoint + - node + - command: settings:set + arguments: + name: language + value: en + - command: generate:doc:gitbook + options: + path: '%{{directory}}/en' + - command: settings:set + arguments: + name: language + value: es + - command: generate:doc:gitbook + options: + path: '%{{directory}}/es' + - command: settings:set + arguments: + name: language + value: hi + - command: generate:doc:gitbook + options: + path: '%{{directory}}/hi' + - command: settings:set + arguments: + name: language + value: hu + - command: generate:doc:gitbook + options: + path: '%{{directory}}/hu' + - command: settings:set + arguments: + name: language + value: pt_br + - command: generate:doc:gitbook + options: + path: '%{{directory}}/pt_br' + - command: settings:set + arguments: + name: language + value: ro + - command: generate:doc:gitbook + options: + path: '%{{directory}}/ro' + - command: settings:set + arguments: + name: language + value: vn + - command: generate:doc:gitbook + options: + path: '%{{directory}}/vn' + - command: settings:set + arguments: + name: language + value: zh_hans + - command: generate:doc:gitbook + options: + path: '%{{directory}}/zh_hans' + - command: settings:set + arguments: + name: language + value: en diff --git a/config/dist/chain/quick-start.yml b/config/dist/chain/quick-start.yml index 4097a67..fa39ae3 100644 --- a/config/dist/chain/quick-start.yml +++ b/config/dist/chain/quick-start.yml @@ -5,6 +5,11 @@ command: name: quick:start description: 'Download, install and serve a new Drupal project' +vars: + repository: + - drupal-composer/drupal-project:8.x-dev + - acquia/lightning-project + - acquia/reservoir-project vars: repository: drupal-composer/drupal-project:8.x-dev profile: standard diff --git a/config/dist/chain/update-gitbook.yml b/config/dist/chain/update-gitbook.yml deleted file mode 100644 index 10520b8..0000000 --- a/config/dist/chain/update-gitbook.yml +++ /dev/null @@ -1,61 +0,0 @@ -commands: - - command: settings:set - arguments: - setting-name: language - setting-value: en - - command: generate:doc:gitbook - options: - path: '%{{book_path}}/en' - - command: settings:set - arguments: - setting-name: language - setting-value: es - - command: generate:doc:gitbook - options: - path: '%{{book_path}}/es' - - command: settings:set - arguments: - setting-name: language - setting-value: hi - - command: generate:doc:gitbook - options: - path: '%{{book_path}}/hi' - - command: settings:set - arguments: - setting-name: language - setting-value: hu - - command: generate:doc:gitbook - options: - path: '%{{book_path}}/hu' - - command: settings:set - arguments: - setting-name: language - setting-value: pt_br - - command: generate:doc:gitbook - options: - path: '%{{book_path}}/pt_br' - - command: settings:set - arguments: - setting-name: language - setting-value: ro - - command: generate:doc:gitbook - options: - path: '%{{book_path}}/ro' - - command: settings:set - arguments: - setting-name: language - setting-value: vn - - command: generate:doc:gitbook - options: - path: '%{{book_path}}/vn' - - command: settings:set - arguments: - setting-name: language - setting-value: zh_hans - - command: generate:doc:gitbook - options: - path: '%{{book_path}}/zh_hans' - - command: settings:set - arguments: - setting-name: language - setting-value: en diff --git a/src/Command/InitCommand.php b/src/Command/InitCommand.php index 80c7c06..fd85af5 100644 --- a/src/Command/InitCommand.php +++ b/src/Command/InitCommand.php @@ -206,7 +206,7 @@ protected function execute(InputInterface $input, OutputInterface $output) ) ); if (!$this->configParameters['chain']) { - $finder->exclude('chain'); + $finder->exclude('chain/optional'); } if (!$this->configParameters['sites']) { $finder->exclude('sites'); @@ -227,6 +227,12 @@ protected function execute(InputInterface $input, OutputInterface $output) $configFile->getRelativePathname() ); + $destinationFile = str_replace( + 'chain/optional/', + 'chain/', + $destinationFile + ); + if ($this->copyFile($sourceFile, $destinationFile, $override)) { $copiedFiles[] = $destinationFile; }