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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 2, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src/DrupalInitCommand.php
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ protected function configure()
37
37
newInputOption('stability', 's', InputOption::VALUE_REQUIRED, 'Minimum stability (empty or one of: '.implode(', ', array_keys(BasePackage::$stabilities)).')'),
38
38
newInputOption('license', 'l', InputOption::VALUE_REQUIRED, 'License of package'),
39
39
newInputOption('repository', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Add custom repositories, either by URL or using JSON arrays'),
40
+
newInputOption('web-dir', 'w', InputOption::VALUE_REQUIRED, 'Specify the docroot (defaults to web)', 'web'),
40
41
// new InputOption('extensions', 'm', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Extensions (such as modules or themes) to require with a version constraint, e.g. panels:^4.0'),
41
42
// new InputOption('extensions-dev', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Extensions (such as modules or themes) to require for development with a version constraint, e.g. panels:^4.0'),
42
43
])
@@ -86,7 +87,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
86
87
$options = $file->read();
87
88
$options['extra'] = [
88
89
'drupal-composer-helper' => [
89
-
'web-prefix' => 'web',
90
+
'web-prefix' => $input->getOption('web-dir'),
90
91
],
91
92
'enable-patching' => true,
92
93
];
@@ -263,6 +264,13 @@ function ($value) use ($self, $minimumStability) {
263
264
);
264
265
$input->setOption('license', $license);
265
266
267
+
$web_dir = $input->getOption('web-dir') ?: false;
268
+
$web_dir = $io->ask(
269
+
'Public web directory [<comment>'.$web_dir.'</comment>]: ',
0 commit comments