Bootstraps an existing mix phx.new project (run inside it) as a
JobyKit demo. Run this when you already have a Phoenix app and want
to convert it into a kit-flavored greenfield demo.
For a fresh app from scratch, use mix joby_kit.new (which wraps
mix phx.new --no-html and ships the kit's HTML layer from minute
one).
Composes mix joby_kit.install (manifest, previews, and the two design
LiveViews) with four additional steps appropriate for a blank greenfield
project:
- Generate a clean
HomeLivewelcome page that composes the host's existing<Layouts.app>, so it reuses the project's nav, flash group, and chrome. - Overwrite the install-shipped DesignSystemLive and
CustomDesignsLive with greenfield variants that compose
<Layouts.app>rather than rendering their own chrome. - Rewire
router.exso: live "/", HomeLive, :index live "/design", DesignSystemLive, :index live "/custom-designs", CustomDesignsLive, :index …and the JSON manifest at/design.json. - Optionally delete the now-unused
PageControllerandPageHTMLmodules (skip with--keep-page-controller).
This task is destructive — it edits router.ex, overwrites generated
LiveViews, and may delete files. Use mix joby_kit.install instead if
you have an existing project with meaningful state at /.
Usage
mix joby_kit.bootstrap
mix joby_kit.bootstrap --force # overwrite all generated files
mix joby_kit.bootstrap --keep-page-controller # leave PageController in place
mix joby_kit.bootstrap --web MyAppWeb # specify web module nameAfter this task completes:
mix phx.server…and visit http://localhost:4000/ for the Home page.