From 815a551a07db4c2028c7484f95358721c42b82d9 Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Tue, 6 Jun 2023 19:01:24 -0700 Subject: [PATCH] installs to project directory now --- bin/component_parts/provider.sh | 2 -- bin/create_component.sh | 10 +++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/component_parts/provider.sh b/bin/component_parts/provider.sh index 9411f2b..41a78aa 100644 --- a/bin/component_parts/provider.sh +++ b/bin/component_parts/provider.sh @@ -31,5 +31,3 @@ return new class implements ServiceProviderInterface { }; EOM - - \ No newline at end of file diff --git a/bin/create_component.sh b/bin/create_component.sh index 91f84f5..a561b25 100644 --- a/bin/create_component.sh +++ b/bin/create_component.sh @@ -46,6 +46,15 @@ if [[ ! "$name" =~ ^[a-z0-9_]+$ ]]; then exit 1 fi +# Check if Components directory exists (development) +if [ ! -d "development" ]; then + echo "Development directory not found. Creating the directory..." + mkdir "development" +fi + +# Change the current working directory to Components +cd "development" || exit + ################################################################################# # Do the work ################################################################################# @@ -68,6 +77,5 @@ source "$script_dir/component_parts/displaycontroller.sh" source "$script_dir/component_parts/view.sh" source "$script_dir/component_parts/defaultview.sh" - echo "Component framework generated successfully!" echo "You should manually edit the manifest file before checkin"