Smuggling .gitignore, .npmrc and friends in npm packages | johnnyreilly
The npm publish command will not just package up .gitignore and .npmrc files. This post shows how to use zipping and unzipping with postinstall and prepare scripts to include these files into your npm package.
johnnyreilly.com