We have a few repos that we use to develop, maintain, test, and deploy our products.
Each package that will become a gem should follow this naming scheme avo_NAME
.
We have a template repository which we will have to keep up to date. In it’s readme you’ll find notes on how to maintain the naming.
Each package can build itself using bud
If a packages has a package.json
file it should have a build
script (mandatory) and a watch
script (optional).
The build
script should build its assets (js
and/or css
) and the watch
must be a running process that continues to build it’s assets in development.
Alternatively, it can implement separate watch commands for each of the processes (yarn build:js —watch
, yarn build:css --watch
).
Each package should build and output their own asset files and register it wiht Avo through Avo.asset_manager
.
We are using Tailwind for all our projects.
avo
will have the base TW pipeline and each gem will bring it’s own TW file but with the preflight (CSS reset) off.
/* avo - app/assets/stylesheets/application.css */
@import "tailwindcss";
... other CSS rules and directives
/* avo-dashboards (or any other engine - app/assets/stylesheets/avo-dashboardsapplication.css */
@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities);
This will enable us to not bundle the engine CSS in avo
but in their own application.css
file.
@layer
enables that.
PRs to be seen as how to upgrde to TW 4 and how to structure the asset pipeline