0.0.7 • Published 10 months ago

generator-aigbb v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

AI GBB Generator npm version

AI GBB Scaffolding Tool

Open in GitHub Codespaces Open in Dev Containers

Installation

First, install Yeoman and generator-aigbb using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-aigbb

Then generate your new project:

yo aigbb awesome-ai-app

Local development:

npm link

Simple end to end testing:

( 
  rm -rf /tmp/foobar; yo aigbb /tmp/foobar && cd /tmp/foobar && \
  AZURE_ENV_NAME=delete-me AZURE_LOCATION=francecentral azd up 
  read
  az ad app delete --id $(az ad app list --display-name "delete-me-app" --query '[].id'  -o tsv)
  azd down --purge --force
)

Cleanup only:

( 
  cd /tmp/foobar && \
  azd down --purge --force
)

Testing backend authentication:

token=$(az account get-access-token \
  --resource api://$(azd env get-value AZURE_CLIENT_APP_ID) \
  -t $(az account show --query tenantId -o tsv) \
  --query accessToken -o tsv)
curl -i  $(azd env get-value SERVICE_BACKEND_URL)/echo \
  -X GET \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $token" \
  -d '{"Hello":"World!"}'

Comparing generations:

yo aigbb  ../hello-ai-world \
  --solutionName 'Hello AI World' \
  --solutionLevel 100 \
  --solutionDescription 'AI Application chassis - best AI app practices optimized for Azure' \
  --solutionSlug hello-ai-world \
  --solutionVersion 0.1.0 \
  --creatorName 'AI GBB EMEA' \
  --creatorEmail dominique.broeglin@microsoft.com \
  --withGitHub true \
  --withFrontend true \
  --withBackend true \
  --gitHubOrg dbroeglin \
  --gitHubRepo hello-ai-world \
  --withGitHubPush ''

# Positive result: the last line in the command output should be "No changes to commit."
yo aigbb  ../aigbb-scaffolding-test-l100 \
  --solutionName 'AI GBB scaffolding tool test' \
  --solutionLevel 100 \
  --solutionDescription 'Solution generated with the AI GBB Scaffolding tool test (l300)' \
  --solutionSlug aigbb-scaffolding-test-l100 \
  --solutionVersion 0.1.0 \
  --creatorName 'Dominique Broeglin' \
  --creatorEmail dominique.broeglin@microsoft.com \
  --withFrontend true \
  --withBackend true \
  --withGitHub true \
  --gitHubOrg dbroeglin \
  --gitHubRepo aigbb-scaffolding-test-l100 \
  --withGitHubPush false
  
# Positive result: the last line in the command output should be "No changes to commit."

yo aigbb  ../aigbb-scaffolding-test-l300 \
  --solutionName 'AI GBB scaffolding tool test' \
  --solutionLevel 300 \
  --solutionDescription 'Solution generated with the AI GBB Scaffolding tool test (l300)' \
  --solutionSlug aigbb-scaffolding-test-l300 \
  --solutionVersion 0.1.0 \
  --creatorName 'Dominique Broeglin' \
  --creatorEmail dominique.broeglin@microsoft.com \
  --withFrontend true \
  --withBackend true \
  --withPackage true \
  --packageName 'AI GBB Scaffolding Core' \
  --packageDescription 'AI GBB Scaffolding Test Core Package' \
  --packageSlug 'aigbb-scaffolding-core' \
  --withGitHub true \
  --gitHubOrg dbroeglin \
  --gitHubRepo aigbb-scaffolding-test-l300 \
  --withGitHubPush false

  
# Positive result: the last line in the command output should be "No changes to commit."

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

License

See the LICENSE file for license rights and limitations (MIT).

Acknowledgements