Today's example why #npm is completely nuts.

The most normal, clean, sane, generally understood thing is that you don't spill your compilation/build output into the project root folder nobody does this, REALLY NO!BO!DY!

The build output is collected in some subdirectory, some call it ./dist. To publish, package, wreckage, fuckage the package (whatever the fuck term is really for npm) you want to tell npm that the build result is in ./dist. Look at this mess on SO:🤦‍♀️ 🤮

https://stackoverflow.com/questions/38935176/how-to-npm-publish-specific-folder-but-as-package-root

How to npm publish specific folder but as package root

I have a project that include a gulp task for building and packaging the sources and release in a directory called dist. My goal is publish it as a npm package, but only my dist folder. The npm

Stack Overflow

As a chance for myself to find this again: when installing an #npm package from a git URL, the following happens **if the package.json has a "prepare"**.

- clone into some tmp repo, found it beyond ~/.npm
- install dev and prod dependencies into that repo
- run prepare script in that repo
- package in that repo (did not see postpack run)
- install the assumedly generated tgz

Search for: "If the package being installed contains a prepare script," at

https://docs.npmjs.com/cli/v8/commands/npm-install#description

#git #npmInstall

npm-install | npm Docs

Install a package