leuchtturm-dev / turboprop

MIT License
54 stars 4 forks source link

Hooks dependencies do not get installed when installing Turboprop from Hex #27

Open domnantas opened 3 months ago

domnantas commented 3 months ago

Hey, great project!

I understand the project is in its infancy, but I think it's worth adressing installation strategy early on.

Currently, adding {:turboprop, "~> 0.4.2"} to mix.exs, running mix deps.get and adding import { Hooks } from "turboprop" to app.js yields errors related to @zag-js dependencies:

✘ [ERROR] Could not resolve "@zag-js/accordion"

    ../deps/turboprop/hooks/dist/index.mjs:6:27:
      6 │ import * as accordion from "@zag-js/accordion";
        ╵                            ~~~~~~~~~~~~~~~~~~~

  You can mark the path "@zag-js/accordion" as external to exclude it from the bundle, which will remove this error.

This is because turboprop depends on @zag-js and there's no easy way to install those dependencies. cd deps/turboprop && npm install works, but that seems a bit silly. Do you think it is possible to design a user-friendly installation process for Hooks?

bamorim commented 2 months ago

I can think of two options here:

Maybe both are a good idea.