wire shop.css alongside Tailwind for CSS migration (Phase 1)
- esbuild profile for shop.css bundling (dev watcher + build aliases) - shop.css loaded as second stylesheet in shop_root layout - LiveView display:contents rule in reset layer - updated Lighthouse + Screenshots tasks for new esbuild target Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,10 @@ config :esbuild,
|
||||
~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.),
|
||||
cd: Path.expand("../assets", __DIR__),
|
||||
env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]}
|
||||
],
|
||||
simpleshop_theme_shop_css: [
|
||||
args: ~w(css/shop.css --bundle --outdir=../priv/static/assets/css),
|
||||
cd: Path.expand("../assets", __DIR__)
|
||||
]
|
||||
|
||||
# Configure tailwind (the version is required)
|
||||
|
||||
@@ -25,6 +25,8 @@ config :simpleshop_theme, SimpleshopThemeWeb.Endpoint,
|
||||
secret_key_base: "Jk04sYT/pzfZ0cywS+i0vCURPoQYgqAGa72uS8bv2gydLyusWFc08kJyEnQP4zgT",
|
||||
watchers: [
|
||||
esbuild: {Esbuild, :install_and_run, [:simpleshop_theme, ~w(--sourcemap=inline --watch)]},
|
||||
esbuild_shop_css:
|
||||
{Esbuild, :install_and_run, [:simpleshop_theme_shop_css, ~w(--sourcemap=inline --watch)]},
|
||||
tailwind: {Tailwind, :install_and_run, [:simpleshop_theme, ~w(--watch)]},
|
||||
tailwind_shop: {Tailwind, :install_and_run, [:simpleshop_theme_shop, ~w(--watch)]}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user