Hey
I have extracted from a few projects a boilerplate to package Stimulus controller as an NPM package.
It includes all the rollup config, test environment & scripts.
: https://github.com/adrienpoly/stimulus-library-boilerplate
It is pretty basic at this point, comments & PR welcome
Hope this can help!