I want to publish and dynamically ignore a folder.
Normally we put ignored items in .npmignore or whatever is not in the files property in package.json.
But in my case, I want to dynamically ignore a file/folder, at the command line when publishing, in my case, a folder called .r2g, so that would be:
npm publish --ignore=".r2g"
For context, see:
the .r2g folder is necessary for testing before publishing, but when we actually publish, we can drop the .r2g dir, as a last step.