v4_admin is not a Node package, it is a Next.js app where the whole app/ directory is cloned into each theme to become part of that theme's code base at build time. For this reason, we have a custom versioning system to allow us to roll out admin changes incrementally on a per-theme basis.
Each theme contains a .admin-version file. This file should contain the git tag of the version of admin the theme should clone. When a theme build runs, a script will read this file and then clone admin from Bitbucket using that tag.
New versions of admin should be published via Jenkins here:
https://jenkins.production.homeflow.co.uk/blue/organizations/jenkins/v4_admin/activity
After a build has succeeded, a prompt will appear to ask you to enter the new version number (please follow semantic versioning). Admin will then be published to that tag.
You can then update the .admin-version in each theme and merge that change, which will cause admin to be cloned from that tag before building the theme app.
Add a LOCAL_ADMIN_PATH env variable to your .env.local file in the theme you are working on to work with a local version of admin
For example:
LOCAL_ADMIN_PATH=../v4_admin
To avoid conflicts between admin and theme Tailwind CSS bundles, we use a prefix of admin: for all admin-specific Tailwind classes.
All admin Tailwind classes must include this prefix or they will not work correctly.
For example:
admin:border
admin:font-bold
admin:my-2
admin:pb-5
admin:h-5
Be careful not to apply this prefix to classes that are meant to be used by themes when they are rendered inside the page builder or other preview areas (like @container) and for non-Tailwind classes (like site or rich-text-control).