Prepublish
Prepublish refers to a stage in a publishing workflow during which preparatory tasks are completed before an item is released. In software development and content distribution, prepublish tasks are intended to ensure that artifacts are ready for public use, such as being properly built, tested, and packaged, and that metadata and licenses are correct. The exact steps of prepublish vary by domain but commonly include building distributables, running tests, generating documentation, and bundling assets.
In the npm ecosystem, prepublish was a lifecycle script that ran before the package was published to
Best practices in general emphasize limiting prepublish to non-destructive validation and preparation steps, and moving heavy