Created
August 11, 2023 06:20
-
-
Save naxmefy/8d067a8693be79278c0487f1343f2871 to your computer and use it in GitHub Desktop.
Revisions
-
naxmefy revised this gist
Aug 11, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ #!/usr/bin/env sh # check for command - here example with nestjs # shellcheck disable=SC2039 if ! command -v nest &> /dev/null then -
naxmefy created this gist
Aug 11, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ #!/usr/bin/env sh # shellcheck disable=SC2039 if ! command -v nest &> /dev/null then echo "nest could not be found. install with 'npm install --global @nestjs/cli'" exit fi MAX=$( # shellcheck disable=SC2164 cd samples; # shellcheck disable=SC2035 find * -type d -maxdepth 0 -mindepth 0 | awk '/^([0-9]+)\-.+$/ { printf("%d\n", $1) }' | sort -n | tail -n1 ) PROJECT_NAME=$1 NEXT=$((MAX + 1)) # command to create example project # here example with nestjs # nest new -s -g -p npm --directory "samples/$(printf "%05d\n" $NEXT)-$PROJECT_NAME" "$PROJECT_NAME" # here example with flutter # flutter create --org me.nax.lab --project-name "$PROJECT_NAME" "samples/$(printf "%05d\n" $NEXT)-$PROJECT_NAME"