directus-labs / extensions

Experimental and community-maintained extensions for Directus
MIT License
24 stars 6 forks source link

Initialize the Monorepo #1

Closed binaryben closed 3 months ago

binaryben commented 3 months ago

Migrated the existing extensions to the packages subdirectory and retained their git history. Two caveats:

These issues will be resolved in another PR.


In case it's ever needed again, here is the commands to migrate extensions to this repo:

export EXTENSION="ai-focal-point-detection-operation" # Don't add the extension- prefix
export GIT_NAME=""
export GIT_EMAIL=""

cd ../extension-$EXTENSION &&
  mkdir -p packages/$EXTENSION &&
  git mv -k * packages/$EXTENSION &&
  git mv -k .* packages/$EXTENSION &&
  git config user.email $GIT_EMAIL &&
  git config user.name $GIT_NAME &&
  git commit -m "Moved files to monorepo directory structure" &&
  cd - &&
  git remote add -f ext ../extension-$EXTENSION &&
  git merge ext/main --allow-unrelated-histories &&
  git remote remove ext &&
  rm -rf ../extension-$EXTENSION

This assumes: