Skip to content
Snippets Groups Projects
Commit fd709606 authored by jurgenhaas's avatar jurgenhaas
Browse files

Code cleanup and minor tweaks

parent 11f19dd4
Branches
No related tags found
No related merge requests found
......@@ -45,7 +45,6 @@ class Handler {
* Configure composer.json.
*/
public function configureComposerJson() {
$fs = new Filesystem();
$projectRoot = getcwd();
$composerJson = getenv('COMPOSER');
......@@ -67,7 +66,7 @@ class Handler {
$jsonFile->write($content);
// Add some patterns to .gitignore.
foreach ([$composerJson, $composerLock, '/vendor/', '/web/', '.env'] as $item) {
foreach (['/' . $composerJson, '/' . $composerLock, '/vendor/', '/web/', '/.env'] as $item) {
exec('git ignore ' . $item);
}
}
......@@ -94,9 +93,9 @@ class Handler {
}
$fs->mkdir($moduleRoot);
foreach (scandir($projectRoot) as $item) {
if (!in_array($item, ['.', '..', '.git', '.idea', 'vemdor', 'web'])) {
if (!in_array($item, ['.', '..', '.git', '.idea', 'vendor', 'web'])) {
$rel = $fs->makePathRelative($projectRoot, $moduleRoot);
$fs->symlink($rel . "/$item", $moduleRoot . "/$item");
$fs->symlink($rel . $item, $moduleRoot . "/$item");
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment