-
Notifications
You must be signed in to change notification settings - Fork 941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add setup wizard? #384
Conversation
Would make sense to also remove
|
They still need to be GPL-licensed even if you don't intend to distribute them to a client. |
@pfrenssen Yes, you're right. I got confused. Of course the site is GPL-licensed even in that case. What happens when you don't distribute the site is that you're not forced to provide the site user with a copy of it's source code. Still, the drupal-project README.md should be removed from the created project. |
} | ||
$config['extra']['installer-paths'] = $installer_paths; | ||
} | ||
$fs->dumpFile('.gitignore', $gitIgnore); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this before line 23. The logical flow would be to save the new gitignore just after the preg_replace on the gitIgnore lines, and not after the installer_paths block.
} | ||
$fs->dumpFile('.gitignore', $gitIgnore); | ||
} | ||
if ($event->getIO()->askConfirmation('<info>Remove dotenv?</info> [<comment>y,N</comment>]? ', TRUE)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since default is true, it should be 'Y,n'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, remove the .env.example and load.environment.php files (same as other scaffold files below).
unset($config['require']['vlucas/phpdotenv']); | ||
unset($config['require-dev']['vlucas/phpdotenv']); | ||
} | ||
if ($event->getIO()->askConfirmation('<info>Remove drush?</info> [<comment>y,N</comment>]? ', FALSE)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, also remove the drush/Commands/PolicyCommands.php, drush/README.md, drush/drush.yml and drush/sites/self.site.yml files (same as other scaffold files below).
'.travis.yml', | ||
'phpunit.xml.dist', | ||
'scripts/composer/Setup.php', | ||
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove also the drupal-composer README.md file.
unset($config['require']['drupal/console']); | ||
unset($config['require-dev']['drupal/console']); | ||
} | ||
if ($event->getIO()->askConfirmation('<info>Remove the installer and other scaffold files?</info> [<comment>y,N</comment>]? ', FALSE)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Project would be more user friendly if this option was TRUE by default. In which case, make the comment text 'Y,n'.
} | ||
} | ||
unset($config['require']['vlucas/phpdotenv']); | ||
unset($config['require-dev']['vlucas/phpdotenv']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no phpdotenv in the require-dev section of composer.json.
This works great but it throws an error when it starts installing dependencies because the altered I have been looking through the code if it is possible to trigger a reload of the In my own project I solved it by implementing Here's the patch I used in my project to fix this, it might help you:
|
I added a lot of wizard-like behavior in digitalpulp/ballast which is downstream to this project. |
I'm also having another problem related to modifying the We are also working on a downstream variant of this, it might serve as inspiration: openeuropa/drupal-site-template#1 |
Are we about to recreate drupal-init from hussainweb/drupal-composer-init. Probably not :-) |
Hi! Is the current whole code in I don't have a full scope of it, but the only necessity for I supposed that edit: for Cheers! |
DCG has got similar wizard recently. |
What's DCG? |
https://github.com/Chi-teck/drupal-code-generator I think the approach with script handlers in Composer template will always be tricky because of the need to update/remove existing files. |
This pull request/issue has been inactive for over a year and is being closed due to inactivity. If the issue still persists or the contribution is still relevant, please feel free to reopen it or create a new one. Thank you for your understanding and your contributions to the project! |
I wrote a setup class, which provides some configuration options prior project initialization and deletes itself afterwards. This could be interesting for the composer initiative, or evaluator experience. We could add more features to this template without enforcing every feature.
The code is not pretty, but it does the job.
Current features:
Possible features:
Command for evaluation:
Related issues: