Building an NPM package

I am a graduate of the FCC front-end curriculum, and I have been working in the pass year as a developer, and in the last 6 months in a company.
There are a few packages I’d like to publish to NPM. This requires some more advanced capabilities, such as building tests and compiling ES6 Javascript. I found it a bit difficult to find resources and tools on this matter (which are up to date).
Can you please advice on some resources and tools for this purpose? Either resources designed for a developer who is new to writting packages, or resources you use by yourselves for this purpose?