I have a lib written in TypeScript that compile into a “dist” folder. I want to publish the content of that folder and not the content of the root of my project. This is because I want the lib consumers to be able to require the lib components this way:
This last form doesn’t make sense because the dist folder doesn’t serve any kind of semantic in the distributed package - it only exists in the distributed package because I don’t know how to remove it.
I tried to change directory on the prepublish script but it’s not propagated to the publish script.
How can I do that?