I wanted to extract a very basic controller that lives in my application out into its own package so that it can be reused by future applications.
I took a look at some of the NPM packages that are currently on npmjs.org with the
stimulus tag, and there seem to be many varied approaches to how to provide a shareable controller through a package. The two that I was able to understand and utilize the best were this Flatpickr library by adrienpoly and this tab implementation by jwald1.
For anyone who is more familiar with NPM package creation and Webpacker than me (read: everyone), would you mind taking a look at the package I’ve created here and providing feedback?
I think that creating some kind of “Best Sharing Practices” guide for a basic StimulusJS controller would be very helpful to the community as it continues to grow, and I would be more than happy to take part in that effort as a way to teach myself more about this ecosystem.